Python 2.5, problems reading large ( > 4Gbyes) files on win2k

Paul Duffy paduffy at cisco.com
Fri Mar 2 13:51:26 EST 2007


I am not using the universal newline.  File reading loop is essentially...

ifile = open("fileName", "r")
for line in ifile
  ...

Thanks

Peter Otten wrote:
> paduffy at cisco.com wrote:
>
>   
>> I've a Python 2.5 app running on 32 bit Win 2k SP4 (NTFS volume).
>> Reading a file of 13 GBytes, one line at a time.  It appears that,
>> once the read line passes the 4 GByte boundary, I am getting
>> occasional random line concatenations.  Input file is confirmed good
>> via UltraEdit.  Groovy version of the same app runs fine.
>>
>> Any ideas?
>>     
>
> Do you open the file in  universal newline mode -- open(filename, "U") --,
> and if not, does the problem persist if you do?
>
> Peter
>   



More information about the Python-list mailing list