Never mind. Apparently, these tags throw it for that loop:Why does that surprise you? A jpeg has a well-defined header that tells
print '<html><body>\n'
I´m surprised they would, but gratified I found the problem.
Victor
whatever application is rendering it what to look for. By putting those
tags at the beginning of the data sent to your browser, you're no longer
getting a well-formed jpeg. The header is wrong.
As an experiment, if you're on *nix, or have access to a decent shell,
try this:
$ echo '<html><body>' newfile.jpg
$ cat /path/to/any_normal_jpeg >newfile.jpg
$ echo '</body></html>' >newfile.jpg
If you don't have access to a shell, open a JPEG with your favorite text
editor, and manually add "<html><body>" to the beginning, and save it
out.
Then try to open newfile in any piece of software of your choosing.
It's no longer a well-formed jpeg, so it won't work. That's exactly
what you're asking the browser to do.
I guess this isn't really python related, so my apologies for that.
Cheers,
Cliff
--
Oook,
J. Cliff Dyer
Carolina Digital Library and Archives
UNC Chapel Hill