Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
>>> import tempfile
>>> rrdfile = tempfile.NamedTemporaryFile()
>>> parameters = ' --start 920804400'
>>> parameters += ' DS:speed:COUNTER:600:U:U'
>>> parameters += ' RRA:AVERAGE:0.5:1:24'
>>> parameters += ' RRA:AVERAGE:0.5:6:10'
>>> create(rrdfile.name, parameters)

>>> xml = dump(rrdfile.name)
>>> xmlBytes = len(xml)(more...)

        def dump(filename, outfile="", parameters=""):
    """
    >>> import tempfile
    >>> rrdfile = tempfile.NamedTemporaryFile()
    >>> parameters = ' --start 920804400'
    >>> parameters += ' DS:speed:COUNTER:600:U:U'
    >>> parameters += ' RRA:AVERAGE:0.5:1:24'
    >>> parameters += ' RRA:AVERAGE:0.5:6:10'
    >>> create(rrdfile.name, parameters)

    >>> xml = dump(rrdfile.name)
    >>> xmlBytes = len(xml)
    >>> 3300 < xmlBytes < 4000
    True
    >>> xmlCommentCheck = '