Prev: Which version of MSVC?90.DLL's to distribute with Python 2.6 basedPy2exe executables?
Next: Setting Parameters inside of code
From: luca72 on 17 Dec 2009 15:59 I have a bin file that i read as: in_file = open('primo.ske', 'rb') leggo = luca.readlines() i get a list like : ['\x00\x80p\x8b\x00\x00\x01\x19\x9b\x11\xa1\xa1\x1f\xc9\x12\xaf\x81! \x84\x01\x00\x01\x01\x02\xff\xff\x80\x01\x03\xb0\x01\x01\x10m\x7f\n', etc...] but if i try to print luca[0] i get not the the string in the list but i get some like " ò°{" how i can get a string like the string in the list? Thanks Luca
From: Jerry Hill on 17 Dec 2009 16:15
On Thu, Dec 17, 2009 at 3:59 PM, luca72 <lucaberto(a)libero.it> wrote: > I have a bin file that i read as: > in_file = open('primo.ske', 'rb') > leggo = luca.readlines() > > i get a list like : > ['\x00\x80p\x8b\x00\x00\x01\x19\x9b\x11\xa1\xa1\x1f\xc9\x12\xaf\x81! > \x84\x01\x00\x01\x01\x02\xff\xff\x80\x01\x03\xb0\x01\x01\x10m\x7f\n', > etc...] > > but if i try to print  luca[0] > i get not the the string in the list but i get some like " ò°{" > how i can get a string like the string in the list? print repr(luca[0]) -- Jerry |