M
martian
Hi,
I've a couple of questions regarding the processing of a big text file
(16MB).
1) how does python handle:
is big_file all read into memory or one line is read at a time or a buffer
is used or ...?
2) is it possible to advance lines within the loop? The following doesn't
work:
the function readline (file pointer) is "out of sync" with the loop (and
this suggests bug_file is not read one line at a time in the loop).
Thanks,
Fernando Martins
I've a couple of questions regarding the processing of a big text file
(16MB).
1) how does python handle:
for line in big_file:
is big_file all read into memory or one line is read at a time or a buffer
is used or ...?
2) is it possible to advance lines within the loop? The following doesn't
work:
line_after = big_file.readline()for line in big_file:
the function readline (file pointer) is "out of sync" with the loop (and
this suggests bug_file is not read one line at a time in the loop).
Thanks,
Fernando Martins