Greg Fawcett
greg at vig.co.nz
Sun Feb 25 16:18:12 EST 2007
It would be interesting to see if you could open the file in /tmp and copy the contents to your web directory. Or could you create a symlink to the /tmp file? Cheers! Greg. On 26/02/07, Rajarshi Guha <rguha at indiana.edu> wrote: > > Hi, I have a mod_python based application in which I would like to > generate a chart using matplotlib. > > Currently, when I try to call the function that generates the chart I > get a 'HOME not writable' error. I realize why this is happening and so > I modified my apache startup script to export a HOME directory of '/tmp' > > When this is done, the chart is generated, but when I try to dump the > chart to a file using: > > canvas.print_figure( ... ) > > the file is always created in /tmp (i.e., the value of HOME), rather > than in the file that I specify (which is in a current directory that is > writable by apache). > > Has anybody successfully used matplotlib in a mod_python application, to > actually save a chart to a disk file? > > (I realize that one way would be to send back the raw image bytes, but > the image is supposed to be a part of an HTML page, so I can't go down > that path) > > Any pointers would be greatly appreciated. > > Thanks, > > ------------------------------------------------------------------- > Rajarshi Guha <rguha at indiana.edu> > GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE > ------------------------------------------------------------------- > The Heineken Uncertainty Principle: > You can never be sure how many beers you had last night. > > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070226/28680ce0/attachment.html
|