Message322649
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. |
|
Date |
User |
Action |
Args |
2018-07-30 04:15:06 | terry.reedy | set | recipients:
+ terry.reedy, paul.moore, tim.golden, zach.ware, steve.dower, Cross!Alex21, j-rewerts |
2018-07-30 04:15:06 | terry.reedy | set | messageid: <1532924106.42.0.56676864532.issue34258@psf.upfronthosting.co.za> |
2018-07-30 04:15:06 | terry.reedy | link | issue34258 messages |
2018-07-30 04:15:05 | terry.reedy | create | |
|