Re: [Tutor] reading very large files

2011-05-17 Thread Emile van Sebille
On 5/17/2011 10:20 AM Vikram K said... I wish to read a large data file (file size is around 1.8 MB) and manipulate the data in this file. Just reading and writing the first 500 lines of this file is causing a problem. I wrote: fin = open('gene-GS00471-DNA_B01_ 1101_37-ASM.tsv') count = 0 for i

Re: [Tutor] reading very large files

2011-05-17 Thread Jerry Hill
On Tue, May 17, 2011 at 1:20 PM, Vikram K wrote: > I wish to read a large data file (file size is around 1.8 MB) and manipulate > the data in this file. Just reading and writing the first 500 lines of this > file is causing a problem. I wrote: ... > > Traceback (most recent call last): >   File >

Re: [Tutor] reading very large files

2011-05-17 Thread Sander Sweers
On Tue, 17 May 2011, 19:20:42 CEST, Vikram K wrote: > I wish to read a large data file (file size is around 1.8 MB) and > manipulate the data in this file. Just reading and writing the first 500 > lines of this file is causing a problem. I wrote: Unless you are very constrained memory wise 1.8 M

[Tutor] reading very large files

2011-05-17 Thread Vikram K
I wish to read a large data file (file size is around 1.8 MB) and manipulate the data in this file. Just reading and writing the first 500 lines of this file is causing a problem. I wrote: fin = open('gene-GS00471-DNA_B01_ 1101_37-ASM.tsv') count = 0 for i in fin.readlines(): print i count