Terry J. Reedy <tjre...@udel.edu> added the comment:
In IDLE, Run Module, F5, is a shortcut, in a sense, for saving the file to filename, switching to a terminal or console window, such as Command Prompt on Windows, and entering 'python -i filename'. The -i means 'switch it interactive mode after running the file'. When you are done, and close the window, you can switch back to the editor. The IDLE Shell more-or-less simulates Python's interactive mode. When you hit F5, a separator line is added, like =================== RESTART: F:\Python\a\tem.py ===================== to indicate that Shell reinitialized itself and is now running your program. This is completely normal and intended. When your program finishes, Shell will display '>>> '. Please try to read the IDLE doc, which is available on the Help menu as 'IDLE Help'. You can ask about using Python and IDLE on python-list. Always mention the Python version and operating system you are using. You program has a bug. In the 'else' section, it tries to print q1 without q1 being defined. If a program has a severe bug that caused the Python executing your code to crash, Shell will restart with a line that does not have a filename, like ======================== RESTART ======================== This is hard to bring about and is also not an IDLE bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34258> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com