Re: More More Fun w/ Pics MySQL

2009-10-18 Thread Victor Subervi
Thank you all. I have __no__idea__ why the link I sent you, that you tested, __didn't__ work for me. Was it a problem with the browser? Why did it render other images fine? Strange! Well, glad it works *today*. Hopefully it'll work tomorrow, when I try and pick up a check from my client!

Re: More More Fun w/ Pics MySQL

2009-10-18 Thread Carsten Haese
Victor Subervi wrote: Thank you all. I have __no__idea__ why the link I sent you, that you tested, __didn't__ work for me. Was it a problem with the browser? My Magic 8-Ball says Unclear. Ask again later. Regarding Carsten's misunderstanding of my mentioning of commenting out statements,

Re: More More Fun w/ Pics MySQL

2009-10-18 Thread Lie Ryan
Carsten Haese wrote: Victor Subervi wrote: Thank you all. I have __no__idea__ why the link I sent you, that you tested, __didn't__ work for me. Was it a problem with the browser? My Magic 8-Ball says Unclear. Ask again later. Regarding Carsten's misunderstanding of my mentioning of

Re: More More Fun w/ Pics MySQL

2009-10-17 Thread Victor Subervi
in line... On Sat, Oct 17, 2009 at 11:33 AM, Carsten Haese carsten.ha...@gmail.comwrote: Victor Subervi wrote: Let me clarify. This prints out all sorts of crap, which means an image string, the image as a string, to the screen: print 'Content-type: image/jpeg' print

Re: More More Fun w/ Pics MySQL

2009-10-17 Thread Carsten Haese
Victor Subervi wrote: in line... On Sat, Oct 17, 2009 at 11:33 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: Why would turning a comment into a statement NOT make a difference?!? You misunderstood. Leaving in the __commented__ line __commented__

Re: More More Fun w/ Pics MySQL

2009-10-17 Thread Lie Ryan
Carsten Haese wrote: Victor Subervi wrote: [snip...] print 'Content-type: image/jpeg' print 'Content-Encoding: base64' print print pic().encode('base64') print '/body/html' [snip...] Why are you printing /body/html at the end of a page that is supposed to be a base64-encoded JPEG file?

More More Fun w/ Pics MySQL

2009-10-16 Thread Victor Subervi
Hi; Okay, here's the code: #! /usr/bin/python import cgitb; cgitb.enable() import MySQLdb import cgi import sys,os sys.path.append(os.getcwd()) from login import login def pic(): user, passwd, db, host = login() form = cgi.FieldStorage() db = MySQLdb.connect(host, user, passwd, db)

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Carsten Haese
Victor Subervi wrote: [snip...] print 'Content-type: image/jpeg' print 'Content-Encoding: base64' print print pic().encode('base64') print '/body/html' [snip...] Why are you printing /body/html at the end of a page that is supposed to be a base64-encoded JPEG file? -- Carsten Haese

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Victor Subervi
I was trying all sorts of crap. I tried it without, too. Still didn't work :( V On Fri, Oct 16, 2009 at 4:42 PM, Carsten Haese carsten.ha...@gmail.comwrote: Victor Subervi wrote: [snip...] print 'Content-type: image/jpeg' print 'Content-Encoding: base64' print print

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Carsten Haese
Victor Subervi wrote: I was trying all sorts of crap. I tried it without, too. Still didn't work :( Please help us help you. Still didn't work tells us nothing. See http://catb.org/~esr/faqs/smart-questions.html for hints on how you can ask a questions in a way that makes them more likely to

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Victor Subervi
I'm sorry. These scripts worked fine before and should have been plug-and-play. I have wasted 2 frustrating weeks trying to figure out why they don't work only to discover things that make no sense at all that do the trick. I thought programming was straight-forward and logical...boy, am I

Re: More More Fun w/ Pics MySQL

2009-10-16 Thread Carsten Haese
Victor Subervi wrote: I'm sorry. These scripts worked fine before and should have been plug-and-play. I have wasted 2 frustrating weeks trying to figure out why they don't work only to discover things that make no sense at all that do the trick. I thought programming was straight-forward and