How print binary data on screen

2009-03-17 Thread Ehsen Siraj
I am trying to print binary data on screen but I got the following error. f = open('/home/ehsen/1.mp3','rb') g = f.read() print g Traceback (most recent call last): File input, line 1, in module File /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/py/shell.py, line 1160, in writeOut

Re: How print binary data on screen

2009-03-17 Thread Irmen de Jong
Ehsen Siraj wrote: I am trying to print binary data on screen but I got the following error. f = open('/home/ehsen/1.mp3','rb') g = f.read() print g [...] UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: unexpected code byte please help me how i fix this thing. One

Re: How print binary data on screen

2009-03-17 Thread Mensanator
On Mar 17, 1:45 pm, Irmen de Jong irmen.nos...@xs4all.nl wrote: Ehsen Siraj wrote: I am trying to print binary data on screen but I got the following error. f = open('/home/ehsen/1.mp3','rb') g = f.read() print g [...] UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in

Re: How print binary data on screen

2009-03-17 Thread andrew cooke
Mensanator wrote: Maybe he's looking for the face of Jesus? or aphex twin -- http://mail.python.org/mailman/listinfo/python-list