[Tutor] PRINTING A GIF IMAGE

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Wed, 16 Jan 2002 22:56:23 -0800 (PST)


On Thu, 17 Jan 2002, kirk Bailey wrote:

> I wanted to display the pythonpowered.gif image in a script, and
> inclluded a print line with an html image tag. The thing BARKED LIKE A
> DOG and TRIED TO EXECUTE THE IMAGE. The html was pristine, completely
> right.

We need more information; since it's surprising to you, it's probably also
a complete mystery to us.  *grin*

Successful bug hunting involves looking at the clues, and keeping our eyes
open.  We need do say exactly why we think there's a bug, what we expected
to see, and what happened instead.  Most importantly, we have to fight the
impulse to make prejudgements on our own code.

Here are a few questions that might help us understand the context of the
bug:  Can you show us the string you printed?  What exactly tried to
execute the image: Python, or the web browser, or...?  At what part of
your program were we in before doing this?  Was this for CGI, or a
standalone program?  What happens when we vary the content of the image
tag?