Re: Python 2.6 StreamReader.readline()

2012-07-25 Thread wxjmfauth
On Wednesday, July 25, 2012 11:02:01 AM UTC+2, Walter Dörwald wrote: > On 25.07.12 08:09, Ulrich Eckhardt wrote: > > > Am 24.07.2012 17:01, schrieb cpppw...@gmail.com: > >> reader = codecs.getreader(encoding) > >> lines = [] > >> with open(filename, 'rb') as f: > >> lines

Re: Python 2.6 StreamReader.readline()

2012-07-25 Thread Walter Dörwald
On 25.07.12 08:09, Ulrich Eckhardt wrote: Am 24.07.2012 17:01, schrieb cpppw...@gmail.com: reader = codecs.getreader(encoding) lines = [] with open(filename, 'rb') as f: lines = reader(f, 'strict').readlines(keepends=False) where encoding == 'utf-16-be' Everything wo

Re: Python 2.6 StreamReader.readline()

2012-07-24 Thread Ulrich Eckhardt
Am 24.07.2012 17:01, schrieb cpppw...@gmail.com: reader = codecs.getreader(encoding) lines = [] with open(filename, 'rb') as f: lines = reader(f, 'strict').readlines(keepends=False) where encoding == 'utf-16-be' Everything works fine, except that lines[0] is equal to c

Python 2.6 StreamReader.readline()

2012-07-24 Thread cpppwner
Hi, I have a simple question, I'm using something like the following lines in python 2.6.2 reader = codecs.getreader(encoding) lines = [] with open(filename, 'rb') as f: lines = reader(f, 'strict').readlines(keepends=False) where encoding == 'utf-16-be' Everything works f