Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2002 23:19:17 -0700 (PDT)
From:      Andrew Gould <andrewgould@yahoo.com>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Python on FreeBSD -- problems?
Message-ID:  <20020423061917.49507.qmail@web13408.mail.yahoo.com>
In-Reply-To: <20020423002658.GA3341@hades.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
It worked!  Thanks again.

Andrew Gould

--- Giorgos Keramidas <keramida@ceid.upatras.gr>
wrote:
> On 2002-04-22 16:42, Andrew Gould wrote:
> > The code is attached in the text file thcic.py. 
> The
> > traceback mentions a memory error at line 37.
> 
> My guess is you're running out of memory or hitting
> some memory
> allocation limit because datasource.readlines()
> tries to fetch all the
> data from the datasource and store it in memory near
> line 37.
> 
>     34	#Read each line of the data source and insert
> the fields and tab delimiters
>     35	#into the outfile.
>     36
>     37	for recordn in datasource.readlines():
>             ...
>    146	datasource.close()
>    147	newfile.close()
> 
> You're probably hitting the user limits imposed by
> FreeBSD on you,
> even though the system still has free memory.  Try
> rewriting this loop
> to read one line at a time, and see if it solves the
> problem.
> 
> - Giorgos
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020423061917.49507.qmail>