[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [py-rrdtool-users] generate graphs directly to a buffer
From: |
Javier Palacios |
Subject: |
Re: [py-rrdtool-users] generate graphs directly to a buffer |
Date: |
Thu, 17 Dec 2009 09:35:09 +0100 |
On Tue, Dec 15, 2009 at 11:34 PM, Clemens Weninger
> buffer and not take the detour of saving them to disk.
> If I use
>
> #!/usr/bin/python
> import rrdtool
> rrdtool.graph(('-', <options>)
>
> I get the output directly into the stdout, but I found no way to redirect the
Just printing some basic header lines before the graph (content-type
and so), you should be able to turn the http request for the script
into a valid image response towards the browser.
> output in any way. Is it even possible to use something like cStringIO to get
> the output in a buffer I can access?
> If it is not possible at the moment is is possible to modify the bindings to
> include this functionality without too much work?
I understand that you want to "write" the file into memory. And as far
as I remember the code, it is probably not easy to implement. But
writting directly to stdout should work.
Javier Palacios