[Tutor] PRINTING A GIF IMAGE

kirk Bailey idiot1@netzero.net
Fri, 18 Jan 2002 00:41:50 -0500


Danny Yoo wrote:
> 
> On Thu, 17 Jan 2002, kirk Bailey wrote:
> 
> > > Here are a few questions that might help us understand the context of the
> > > bug:  Can you show us the string you printed?
> > Alas, it is gone, removed, and not preserved. I only accord that honor
> > for successes.
> 
> *laugh*
> 
> It can be interesting to probe "failures" as well.  I personally have
> goofed up a LOT; in retrospect, I think I've learned more from my
> "failures" than my successes.
> 
> > > What exactly tried to execute the image: Python,
> >
> > Python, one of my TL scripts, the menu, 'TLwebmgr.py'. Figured I could
> > pretty things up later- and hesitated, as text only loaded SO much
> > faster than a page with images. Have you noticed the tendancy to
> > websites that take UP TO A MINUTE TO LOAD?!?!? AAIIIEEEE! REVOLTING!
> >
> > But back to cases. The statement in question was in the order of
> >
> > print '<img src="./pythonpowered.gif" border="0">'<br>'
>                                                    ^
> 
> The only thing I see weird in this line is the quote I highlighted up
> there, but that's probably just a typo in the email and not in the
> program.
> 
> How about putting it back in and seeing if you can reproduce the bug?
> I'd be happy to check the bug out if you can tell me how to get the bug to
> show up.

sure thing. It will be in the Menu page by morning, so take a look as
is convient.

> 
> > I tried several variations, kept getting the same errors and deleted
> > it- and that error went away. Single quoted, double with escaped
> > doubles where needed, name it.
> 
> In Python, the single and double quotes have the same meaning; there's no
> distinction between them.
> 
> (The Perl language, on the other hand, makes the distinction between the
> double quotes that interpolate, and the single quotes that don't.)
> 
> What kind of error did you get? Do you have a copy of the error recorded
> in the server access log file?
> 
> > > Was this for CGI,
> > Yes, the web menu page.
> > > or a
> > > standalone program?
> > NO.
> 
> > > What happens when we vary the content of the image?
> >
> > It tries to execute it.
> 
> Now that's strange!  How do you know it is trying to execute the image?

It said so in the web error log. 
'ERROR trying to execute pythonpowered.gif' as near as I recall.
Resets log on a 24 hour basis, is gone now.

> This is not meant to be a flippant question; it's important because it
> might clue us into the 'why' of what's going on.
I know this is not a silly question, you manage to clearly indicate
when the silly bit is set andwhen it is not, and I am grateful for
that.

> 
> >From my understanding, HTML is an inert thing --- it's only when a browser
> like IE or Netscape looks at HTML that things begin to roll.
Ah, but then we introduce a ssi enabled web server, and things start
to get intresting.

> Python has
> no control over how any web browser might interpret HTML, so the error is
> really puzzling to me.
>

It's at the server end, the errors were in the logs.
 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor

-- 
 

 -Respectfully,
              -Kirk D Bailey 
               Consulting Loose Cannon

end



  www.howlermonkey.net                 highprimate@howlermonkey.net
  www.sacredelectron.org                         idiot1@netzero.net
  www.tinylist.org                              grumpy@tinylist.org
----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97