Scott Simpson wrote:
I have a loop
for line in f:
...
and if the line is over about 10,000 characters it lops it off. How do I
get around this?
Hmmm. Works for me on Windows.
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>f = file('longline.txt','w')
f.write("x"*11000 + '\n')
f.write("x"*11000 + '\n')
f.write("x"*11000 + '\n')
f.close()
f = file('longline.txt','r')
for l in f:
.... print len(l)
....
11001
11001
11001
>>f.close()
Could the file have embedded nulls? Are you on Windows? If the file
is small enough, open it in binary mode and do a split on '\n to verify
your data.
....
jay