display image through cgi python html

Ladislav Andel ladaan at iptel.org
Tue Jul 24 11:58:47 CEST 2007


Hi,
I'm trying to display image through my cgi script in HTML page
via <img src="image.cgi">

Can you give me an example, please?
What should be in the cgi script to display it?

Here is what I have in image.cgi but it is incorrect and i'm not able to 
find it on the web.

#!/usr/bin/python
print "Content-Type: image/png\n"
print 'image.png'

thanks,
Lada






More information about the Python-list mailing list