Hi Gregory,
try
Yesterday Gregory Guthrie wrote:
> The following python program fails, but the equivalent command line usage
> works fine, and in fact invoking the command line from the program also works.
>
> I can't see what is wrong with the python API usage of fetch() below.
>
> start = int( time.mktime( (2010,3,1, 0,0,0, 0,0, -1) ) )
> end = int( time.mktime( (2010,4,10, 0,0,0, 0,0, -1) ) )
> print "Dump from:", start, end
> os.system('rrdtool fetch ' + data("temp") + \
> " AVERAGE" + " --start " + str(start) \
> + " --end " + str(end) ) # works
> rrdtool.fetch( data("temp"),
> "AVERAGE", "--start ", str(start),
> "--end ", str(end) ) # fails - error
> below
rrdtool.fetch( data("temp"),
"AVERAGE", "--start", str(start),
"--end", str(end) ) # fails - error below
note the options have NO spaces at the end ...
cheers
tobi
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [email protected] ++41 62 775 9902 / sb: -9900_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users