Menu

#3 Make py-rrdtool acept python tuples as an argument

open
nobody
None
9
2006-03-23
2006-03-23
No

Make py-rrdtool acept python tuples as an argument, at
least, this will make my life alot easier making an
object oriented wrapper of py-rrdtool.

Discussion

  • Pedro Algarvio

    Pedro Algarvio - 2006-03-23
    • priority: 5 --> 9
     
  • Pedro Algarvio

    Pedro Algarvio - 2006-03-23

    Logged In: YES
    user_id=927681

    This Works:
    rrdtool.create('/tmp/test.rrd',
    'DS:speed:COUNTER:600:0:100000', 'RRA:AVERAGE:0.5:1:24',
    'RRA:AVERAGE:0.5:1:48')

    With my wrapper I do:
    my_args_tupple = ('DS:speed:COUNTER:600:0:100000',
    'RRA:AVERAGE:0.5:1:24', 'RRA:AVERAGE:0.5:1:48')
    rrdtool.create('/tmp/test.rrd' str(my_args_tupple))

    And I get:
    _rrdtool.error: can't parse argument
    '('DS:speed:COUNTER:600:0:100000', 'RRA:AVERAGE:0.5:1:24',
    'RRA:AVERAGE:0.5:1:48')'

    What's the prob here? Probably a stupid one...

     
  • Pedro Algarvio

    Pedro Algarvio - 2006-03-23

    Logged In: YES
    user_id=927681

    there was a missing comma in the last post of mine, so where
    you see:
    rrdtool.create('/tmp/test.rrd' str(my_args_tupple))
    it really is:
    rrdtool.create('/tmp/test.rrd', str(my_args_tupple))

    It was just a typo when posting here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.