Hi all.

I would like to use a "combination" of matplotlib and mod_python to
create a
PNG figure on the fly in my web site.
The mod_python handler code should be something like this:


def handler(req):

    fig = Figure()
    ...
    ... figure creation stuff
    ...
    canvas = FigureCanvasAgg(fig)
    canvas.print_figure(req, dpi=72)

   return apache.OK


This code gives me an error as req is not a file-like instance (as
sys.stdout):

TyperError: Could not convert object to file pointer

Is there a way to to this thing ?

Thank you very much for any suggestion,
Paolo

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to