speed problems

Heiko Wundram heikowu at ceosg.de
Thu Jun 3 11:15:21 EDT 2004


Am Donnerstag, 3. Juni 2004 17:04 schrieb Axel Scheepers:
> Another difference might be while( <filehandle>) and line in
> lf.readlines().

In Python, while( <FH> ) becomes:

for line in fh:
   <something>

This will truly iterate over the lines of the file, not preload anything into 
memory.

HTH!

Heiko.




More information about the Python-list mailing list