Message388171
I unlinked the preliminary versions of the code minimized in the 3 post.
The posted code is buggy: it opens a file and then start an infinite loop. It has to be interrupted someway, and the file may not be properly closed and flushed to disk. When I make the loop finite and explicitly close the file, or even better, use a 'with' statement, the file is written as expected. At least on Windows, it runs noticeably slower with the sleep because the minimum sleep is 1/16 second.
Minaki, if you find a problem with unbuggy code, you can post and reopen. If you are a beginner who does not know about things like closing file, flushing to disk, and the with statement, you should post to a question and answer forum such as python-list and ask 'Is Python or my code buggy?' |
|
Date |
User |
Action |
Args |
2021-03-05 22:56:17 | terry.reedy | set | recipients:
+ terry.reedy, minaki_2525 |
2021-03-05 22:56:17 | terry.reedy | set | messageid: <1614984977.64.0.262962983547.issue43365@roundup.psfhosted.org> |
2021-03-05 22:56:17 | terry.reedy | link | issue43365 messages |
2021-03-05 22:56:17 | terry.reedy | create | |
|