Re: [Py-RRDTool-Users] New line weirdness
Status: Beta
Brought to you by:
perky
From: Mark K. <mr...@eu...> - 2004-08-27 15:22:20
|
On Fri, 2004-08-27 at 16:12, al...@al... wrote: > Le Vendredi 27 Ao=FBt 2004 15:30, Mark Kilmartin a =E9crit : > > I have a section of code that calls py-rrdtool as follows. > > > > rrdtool.graph('test.gif','--start=3D-1days','--title=3D"Demo Graph"', > > 'DEF:rtt=3D/var/log/nagios/rrd/172.17.2.1_PING.rrd:RTT:AVERAGE', > > 'DEF:max=3D/var/log/nagios/rrd/172.17.2.1_PING.rrd:RTT:MAX', > > 'COMMENT:"\n maximum average current\n"', > > 'GPRINT:max:MAX:%7.2lf%ss', > > 'GPRINT:rtt:AVERAGE:%7.2lf%ss', > > 'GPRINT:rtt:LAST:%7.2lf%ss') > > > > The data was gathered from calls to ping and seems to work fine. > > > > However when I view the image that is created the text under the graph > > is wrong. > > There the \n from the COMMENT above should be I see A character which > > looks like a V above a T > > I have attached an example of a graph that shows the problem. > > > > Thank you. > > MArk Thanks for the response > My first guess without testing (I don't graph from pyhon), is that the \n= are=20 > interpreted by Python.=20 > Try using \\n inside your strings, or using raw strings : Tried this and it simply appears as \\n on the graph. > r'COMMENT:"\n maximum average current\n"' > (note the r before the first quote).=20 This makes no difference. MArk >=20 > Hope this helps. |