Ok, I found the answer and just wanted to post it for the archives.
My script now begins with:
import cgitb; cgitb.enable()
# set HOME environment variable to a directory the httpd server can write to
os.environ[ 'HOME' ] = 'c:/www/app/tmp/'
Then, before the savefig(), I had to set the content type:
print "Content-Type: image/png\n"
Then all worked well.
I'll keep the agg backend script installed until the next release of
Thanks John and Michael... So much help, short response times.
[mailto:matplotlib-users-bounces@...] On Behalf Of Rodney
Sent: Monday, May 19, 2008 10:21 PM
Subject: Re: [Matplotlib-users] Png stream through Stdout to the web
Sorry, my file name is stdout.py, in both places. And here it is:
from pylab import *
plot ([1 ,2 ,3])
savefig( sys.stdout )