speed problems

Heiko Wundram heikowu at ceosg.de
Thu Jun 3 17:15:21 CEST 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