CGI python 3 write RAW BINARY

Dodo dodo_do_not_wake_up at yahoo.Fr
Wed Apr 28 17:54:07 EDT 2010


Help! this is driving me crazy lol
I want to print raw binary data to display an image file
BUT
python3 outputs b'<binary data>' instead of <binary data>.... so the 
browser can't read the image!!

  f = open("/some/path/%s" % x, 'rb')
  print(f.read())



any idea?
Dorian



More information about the Python-list mailing list