Re: Hexadecimal list conversion

2007-12-20 Thread Gabriel Genellina
En Thu, 20 Dec 2007 12:51:33 -0300, Peter Otten <[EMAIL PROTECTED]> escribió: > Mark T wrote: > >> "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message > >>> If you got that from a file, I bet you read it using the wrong >>> encoding. Try opening the file using codecs.open("filename", "rb",

Re: Hexadecimal list conversion

2007-12-20 Thread John Machin
On Dec 21, 2:51 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Mark T wrote: > > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message > >> If you got that from a file, I bet you read it using the wrong > >> encoding. Try opening the file using codecs.open("filename", "rb", > >> encoding="utf-16-b

Re: Hexadecimal list conversion

2007-12-20 Thread Peter Otten
Mark T wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message >> If you got that from a file, I bet you read it using the wrong >> encoding. Try opening the file using codecs.open("filename", "rb", >> encoding="utf-16-be") instead of plain open. > There is an odd number of bytes in

Re: Hexadecimal list conversion

2007-12-20 Thread Mark T
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > En Thu, 20 Dec 2007 09:30:14 -0300, Neil Webster <[EMAIL PROTECTED]> > escribi�: > >> I have a list which is a line from a file: >> ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00', >> '\x00

Re: Hexadecimal list conversion

2007-12-20 Thread Gabriel Genellina
En Thu, 20 Dec 2007 09:30:14 -0300, Neil Webster <[EMAIL PROTECTED]> escribi�: > I have a list which is a line from a file: > ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00', > '\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\x002\x00'] > > This should be in

RE: Hexadecimal list conversion

2007-12-20 Thread Andreas Tawn
> Hi All. > > I have a list which is a line from a file: > ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009 > \x009\x00', > '\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\ > x002\x00'] > > This should be in the format: > ['381475.502599', '213622.174282'] > > I've tr

Re: Hexadecimal list conversion

2007-12-20 Thread Paul Hankin
On Dec 20, 12:30 pm, Neil Webster <[EMAIL PROTECTED]> wrote: > Hi All. > > I have a list which is a line from a file: > ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00', > '\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\x002\x00'] > > This should be in the form

Hexadecimal list conversion

2007-12-20 Thread Neil Webster
Hi All. I have a list which is a line from a file: ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00', '\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\x002\x00'] This should be in the format: ['381475.502599', '213622.174282'] I've tried a few options using re