How to generate graphics dynamically on the web using Python CGI script?

Steve Holden steve at
Fri Jan 20 16:00:41 CET 2006

Luiz Geron wrote:
> I don't have experience on this, but I think that you can make the
> script return the image "contents" directly to the img tag, without
> passing it to a img file, so you can use something like this:
> <img src="script_that_return_image_contents">
> wich saves some processing and I/O.
No it doesn't, because the script that generates the graphic is then a 
different script from the one that generates the referring HTML. I agree 
that scripted generation of the graphical content is a viable option 
that I overlooked, though it seems from the OP's inquiry that he already 
uses CGI to generate the HTML.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC           
PyCon TX 2006        

More information about the Python-list mailing list