Re: CGI python 3 write RAW BINARY

2010-05-21 Thread sam
On May 7, 7:33 am, Dodo wrote: > Le 01/05/2010 12:52, Dodo a écrit : > > > > > > > Le 30/04/2010 17:52, Antoine Pitrou a écrit : > >> Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : > >>> I don't get a thing. > >>> Now with the fix : > >>> All browsers shows a different thing, but not the i

Re: CGI python 3 write RAW BINARY

2010-05-07 Thread Dodo
Le 01/05/2010 12:52, Dodo a écrit : Le 30/04/2010 17:52, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : I don't get a thing. Now with the fix : All browsers shows a different thing, but not the image! http://ddclermont.homeip.net/misc/python/ If I save it to co

Re: CGI python 3 write RAW BINARY

2010-05-04 Thread Gabriel Genellina
En Sat, 01 May 2010 07:52:01 -0300, Dodo escribió: Le 30/04/2010 17:52, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : I don't get a thing. Now with the fix : All browsers shows a different thing, but not the image! http://ddclermont.homeip.net/misc/python/

Re: CGI python 3 write RAW BINARY

2010-05-01 Thread Dodo
Le 30/04/2010 17:52, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : I don't get a thing. Now with the fix : All browsers shows a different thing, but not the image! http://ddclermont.homeip.net/misc/python/ If I save it to computer : * Windows image viewer won't

Re: CGI python 3 write RAW BINARY

2010-04-30 Thread Antoine Pitrou
Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : > I don't get a thing. > Now with the fix : > All browsers shows a different thing, but not the image! > http://ddclermont.homeip.net/misc/python/ > > If I save it to computer : > * Windows image viewer won't read it > * Irfanview can read it

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 18:33, Dodo a écrit : Le 29/04/2010 17:07, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit : @Antoine : It not sys.stdout.buffer.write but sys.stdout.write() instead. But it still doesn't work, now I have empty content Let me insist: please use sys.std

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 22:21, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit : Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't work. I just tested on my linux server, and it works So, let's modify the script sys.stdout.buffer.write

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Antoine Pitrou
Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit : > Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't > work. > I just tested on my linux server, and it works > > So, let's modify the script > > sys.stdout.buffer.write( f.read() ) > sys.stdo

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 17:07, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit : @Antoine : It not sys.stdout.buffer.write but sys.stdout.write() instead. But it still doesn't work, now I have empty content Let me insist: please use sys.stdout.buffer.write(). You'll also have

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Antoine Pitrou
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit : > > @Antoine : It not sys.stdout.buffer.write but sys.stdout.write() > instead. But it still doesn't work, now I have empty content Let me insist: please use sys.stdout.buffer.write(). You'll also have to call sys.stdout.flush() before doing so.

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 01:45, Antoine Pitrou a écrit : Le Wed, 28 Apr 2010 23:54:07 +0200, Dodo a écrit : Help! this is driving me crazy lol I want to print raw binary data to display an image file BUT python3 outputs b'' instead of so the browser can't read the image!! f = open("/some/path/%s"

Re: CGI python 3 write RAW BINARY

2010-04-28 Thread Antoine Pitrou
Le Wed, 28 Apr 2010 23:54:07 +0200, Dodo a écrit : > Help! this is driving me crazy lol > I want to print raw binary data to display an image file BUT > python3 outputs b'' instead of so the > browser can't read the image!! > > f = open("/some/path/%s" % x, 'rb') > print(f.read()) print

Re: CGI python 3 write RAW BINARY

2010-04-28 Thread Gary Herron
Dodo wrote: Help! this is driving me crazy lol I want to print raw binary data to display an image file BUT python3 outputs b'' instead of so the browser can't read the image!! f = open("/some/path/%s" % x, 'rb') print(f.read()) any idea? Dorian Huh??? In what universe does print

CGI python 3 write RAW BINARY

2010-04-28 Thread Dodo
Help! this is driving me crazy lol I want to print raw binary data to display an image file BUT python3 outputs b'' instead of so the browser can't read the image!! f = open("/some/path/%s" % x, 'rb') print(f.read()) any idea? Dorian -- http://mail.python.org/mailman/listinfo/python-l