In IDLE on Windows, on the menu bar, there is a Shell menu. One of the items on the Shell menu is 'Restart Shell'. The Shell menu is not available in IDLE on Linux.
The Restart Shell command is useful after you have made a change in a module and want to run the module again in the shell.
In IDLE on Linux, I have to close IDLE and open it again for the shell to notice the change in the module.
How can I restart the shell without closing and reopening IDLE as a whole?
from my_module import my_function
, which means I did not import the module, only the function. The documentation says the whole module must have been imported previously forreload(my_module)
to work. So, I typedimport my_module
. Thanks a lot! – Millenarian