file.read() doesn't read the whole file

Ant antroy at gmail.com
Tue Mar 24 05:12:41 EDT 2009


On Mar 24, 7:59 am, Sreejith K <sreejith... at gmail.com> wrote:
...
> data is the whole file, but 'less' gives only the two lines...

>From this statement (that you are using less), it appears that you are
redirecting sys.stdout to a file or similar - if that is the case, you
may need to flush or close the output file before it picks up any
changes.



More information about the Python-list mailing list