On 15/12/09 Clemens Weninger said:
> Hi,
> ok thanks for that tip, I can easily modify the headers now. But a problem
> that remains is how to get the image in the buffer?
> I would like to call:
>
> #!/usr/bin/python
> import rrdtool
>
> rrdtool.graph('-', <further options>) # that should go into buffer
>
> response = HttpResponse(mimetype="image/jpg")
> response.write(buffer)
> return response
>
> but that goes directly to stdout. I tried to redirect stdout to a buffer but
> I
> couldn't get it to work.Can you pass the option an alternate file object? If so pass it a cStringIO object. Mike -- Michael P. Soulier <[email protected]> "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." --Albert Einstein
pgpVokw9Nk9lk.pgp
Description: PGP signature
_______________________________________________ rrd-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
