Re: Memory error due to big input file

2009-07-13 Thread Steven D'Aprano
On Mon, 13 Jul 2009 14:20:13 -0700, Aaron Scott wrote: >> BTW, you should derive all your classes from something.  If nothing >> else, use object. >>   class textfile(object): > > Just out of curiousity... why is that? I've been coding in Python for a > long time, and I never derive my base class

Re: Memory error due to big input file

2009-07-13 Thread Chris Rebert
On Mon, Jul 13, 2009 at 2:51 PM, Vilya Harvey wrote: > 2009/7/13 Aaron Scott : >>> BTW, you should derive all your classes from something.  If nothing >>> else, use object. >>>   class textfile(object): >> >> Just out of curiousity... why is that? I've been coding in Python for >> a long time, and

Re: Memory error due to big input file

2009-07-13 Thread Vilya Harvey
2009/7/13 Aaron Scott : >> BTW, you should derive all your classes from something.  If nothing >> else, use object. >>   class textfile(object): > > Just out of curiousity... why is that? I've been coding in Python for > a long time, and I never derive my base classes. What's the advantage > to der

Re: Memory error due to big input file

2009-07-13 Thread Aaron Scott
> BTW, you should derive all your classes from something.  If nothing > else, use object. >   class textfile(object): Just out of curiousity... why is that? I've been coding in Python for a long time, and I never derive my base classes. What's the advantage to deriving them? -- http://mail.python

Re: Memory error due to big input file

2009-07-13 Thread Dave Angel
sityee kong wrote: Hi All, I have a similar problem that many new python users might encounter. I would really appreciate if you could help me fix the error. I have a big text file with size more than 2GB. It turned out memory error when reading in this file. Here is my python script, the error

Re: Memory error due to big input file

2009-07-13 Thread skip
phoebe> I have a big text file with size more than 2GB. It turned out phoebe> memory error when reading in this file. Here is my python phoebe> script, the error occurred at line -- self.fh.readlines(). phoebe> import math phoebe> import time phoebe> class textfile: p

Re: Memory error due to big input file

2009-07-13 Thread MRAB
sityee kong wrote: Hi All, I have a similar problem that many new python users might encounter. I would really appreciate if you could help me fix the error. I have a big text file with size more than 2GB. It turned out memory error when reading in this file. Here is my python script, the erro

Memory error due to big input file

2009-07-13 Thread sityee kong
Hi All, I have a similar problem that many new python users might encounter. I would really appreciate if you could help me fix the error. I have a big text file with size more than 2GB. It turned out memory error when reading in this file. Here is my python script, the error occurred at line -- s