File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

Gabriel Genellina gagsl-py at yahoo.com.ar
Tue Jan 9 19:05:30 EST 2007


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?
Try to close them explicitely when you finish working on them - do 
not rely on GC for closing files. This has *always* been the 
recomended practice (except maybe, inside a short script that 
finishes quickly).
On Python 2.5 you can use the new `with` statement.


-- 
Gabriel Genellina
Softlab SRL 


	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




More information about the Python-list mailing list