Hi,
I'm having a problem when importing pylab in a python CGI script to generate
some dynamic graphs for a web page.
As soon as I import pylab, my script will fail, and I have no idea why.
As an example, i can have 1x1 black png file, loaded from a script like
thus:
#!/usr/bin/env python
# black.py
fh = open('black.png')
print "Content-type: image/png\n"
print fh.read()
And called from a HTML page via:
<img src="black.py" alt="A black dot">
This will work perfectly until i modify the script to:
#!/usr/bin/env python
# black.py
import pylab
fh = open('black.png')
print "Content-type: image/png\n"
print fh.read()
And I have no idea why :(
I'm fairly new to HTML, and I can't seem to see any meaningful errors in
Firebug. Anyone have any experience with an error like this?
The script runs fine from a terminal and outputs as expected.
I'm using python2.4, python-matplotlib-0.91.2-1.el5.rf on Centos 5.3 (old I
know, but this is a production server)
Any help would be much appreciated.
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users