This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients anmolkejriwal, paul.moore, steve.dower, steven.daprano, tim.golden, zach.ware
Date 2019-11-28.07:29:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574926159.34.0.407958015428.issue38935@roundup.psfhosted.org>
In-reply-to
Content
This is expected behaviour. You read from the position of the file pointer, not the beginning of the file, so after writing to to the file, you have to use the seek() method to return to the beginning if you want to read what you just wrote.

https://docs.python.org/3/library/io.html

https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects
History
Date User Action Args
2019-11-28 07:29:19steven.dapranosetrecipients: + steven.daprano, paul.moore, tim.golden, zach.ware, steve.dower, anmolkejriwal
2019-11-28 07:29:19steven.dapranosetmessageid: <1574926159.34.0.407958015428.issue38935@roundup.psfhosted.org>
2019-11-28 07:29:19steven.dapranolinkissue38935 messages
2019-11-28 07:29:19steven.dapranocreate