Sorry, my file name is stdout.py, in both places. And here it is:
#!c:/Python25/python.exe -u
import sys
import matplotlib
matplotlib.use('Agg')
from pylab import *
plot ([1 ,2 ,3])
savefig( sys.stdout )
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rodney
Haynie
Sent: Monday, May 19, 2008 10:10 PM
To: [email protected]
Subject: [Matplotlib-users] Png stream through Stdout to the web
I could not find anywhere an example of exactly how I would call the py
script and get the png to appear in a web page.
I have py scripts working for cgi, which is great. So I placed my simple
script in the cgi-bin folder and I tried calling it directly:
Localhost/cgi-bin/stdoutTest.py
No image file shows up.
So, I gathered I should refer to the location like any other graphic file.
So I made a test html file and put an image tag and set the src attribute.
<img alt="Test Alt" src="http://localhost/cgi-bin/stdout.py">
I then called the html file:
Localhost/pngTest.html
Still no image appears.
Lastly, if I call stdout.py from the command prompt, then I will see the
stream of data that makes up the png image. So at least I am no longer
getting the traceback error.
Does anyone try to show their graphs without actually saving the png file?
Any help would be greatly appreciated.
-Rodney
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users