In <[EMAIL PROTECTED]>, Julio Biason
wrote:
> If I use a file() in a for, how to I explicitely close the file?
>
>
> for line in file('contents'):
>print line
>
>
> Would this work like the new 'with' statement or it will only be closed
> when the GC finds it?
Only when the GC destroys it
At Wednesday 10/1/2007 02:36, Julio Biason wrote:
[Kinda stealing the thread]
(at least a related question!)
If I use a file() in a for, how to I explicitely close the file?
for line in file('contents'):
print line
Would this work like the new 'with' statement or it will only be close
[Kinda stealing the thread]
On Tue, Jan 09, 2007 at 09:05:30PM -0300, Gabriel Genellina wrote:
> And do you actually need so many open files simultaneously?
> Try to close them explicitely when you finish working on them - do
> not rely on GC for closing files. This has *always* been the
> recom
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At Tuesday 9/1/2007 20:31, Carroll, Barry wrote:
>
>>I've spent about a day investigating our "too many open files" error. I
>>found the following:
>>
>> 1. Windows XP allows a Python 2.5 script to open 509
At Tuesday 9/1/2007 22:03, Carroll, Barry wrote:
The first assumption was correct: the file object is destroyed. The
second assumption is apparently incorrect: the file handle is not
released when the associated object is destroyed. These 'orphaned'
file handles build up and when the OS hand
Hi, Gabriel,
> -Original Message-
> From: Gabriel Genellina [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 09, 2007 4:06 PM
> To: python-list@python.org
> Subject: RE: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final
> report)
>
> At Tuesday 9/1/2007 20:
At Tuesday 9/1/2007 20:31, Carroll, Barry wrote:
I've spent about a day investigating our "too many open files" error. I
found the following:
1. Windows XP allows a Python 2.5 script to open 509 concurrent
files.
And do you actually need so many open files simultaneously?
John et al:
I've spent about a day investigating our "too many open files" error. I
found the following:
1. Windows XP allows a Python 2.5 script to open 509 concurrent
files.
2. RedHat Fedora Core 1 allows a Python 2.3 script to open 1022
concurrent fi
John:
<<>
>
> Hi Barry,
>
> Please always reply on-list if the communication is non-private -- and
> meaningful :-)
Right. I noticed I hadn't "replied-to-all", so I resent the post to the
mailing list. Slip of the mouse, no disrespect intended to the list ;^)
>
> I don't know; here are som
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of John Machin
> Sent: Saturday, January 06, 2007 11:09 PM
> To: python-list@python.org
> Subject: Re: File Closing Problem in 2.3 and 2.4, Not in 2.5
>
> Martin v. Löwis w
On 9/01/2007 8:25 AM, Carroll, Barry wrote:
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:python-
>> [EMAIL PROTECTED] On Behalf Of John Machin
>> Sent: Saturday, January 06, 2007 11:09 PM
>> To: python-list@python.org
>> Subject: Re: File Cl
Martin v. Löwis wrote:
> Carroll, Barry schrieb:
> > What I want to know is:
> >
> > * has anyone else encountered a problem like this, * how was the
> > problem corrected, * can the fix be retro-fitted to 2.5 and 2.4?
>
> From your description, I suspect an error in your code. Your description
> i
Martin v. Löwis wrote:
> Carroll, Barry schrieb:
>> What I want to know is:
>>
>> * has anyone else encountered a problem like this, * how was the
>> problem corrected, * can the fix be retro-fitted to 2.5 and 2.4?
>
> From your description, I suspect an error in your code. Your description
> indi
Carroll, Barry schrieb:
> What I want to know is:
>
> * has anyone else encountered a problem like this, * how was the
> problem corrected, * can the fix be retro-fitted to 2.5 and 2.4?
>From your description, I suspect an error in your code. Your description
indicates that you don't expect to ha
14 matches
Mail list logo