New submission from David Crespo <dcresp...@gmail.com>:
Idle won't save a file if it didn't include a newline when it was opened (ex: opening empty file) Steps for reproducing the error: 1) get into some folder in Windows File Explorer 2) right-click on empty space for context menu 3) click new -> create text file 4) rename to test.py 5) right click on test.py for context menu 6) click Edit with Idle -> Edit with Idle 3.8 64-bit 7) write some code, ex: print('hello, world!) 8) try to save the file with CTRL+S, or menu file->save, file->save as or file->save a copy IDLE will silently refuse to save the file, the 'not saved' asterisk will remain next to the file name and no file is written. I am using a workaround for this since creating empty files and editing them is part of my usual workflow. If I edit the file with another text editor, save it, and then open it from the context menu, it can be saved after editing, but ONLY if i put a newline in the file from the alternate text editor. If my the file does NOT contain any newline at opening time, IDLE refuses to save it. This error (refusing to save) seems to happen also when opening from menu file->open any file which does NOT contain any newline. Regards. ---------- assignee: terry.reedy components: IDLE messages: 376228 nosy: dcrespo3d, terry.reedy priority: normal severity: normal status: open title: Idle 3.8.5 on Win64 won't save a file if it didn't include a newline when it was opened (ex: opening empty file) type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41691> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com