Terry J. Reedy <tjre...@udel.edu> added the comment:
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?' ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed title: Operation conflict between time package and file in python 3.8 3.9 -> Operation conflict between time package and file versions: +Python 3.10 -Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43365> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com