Reason for not allowing import twice but allowing reload()

alien2utoo at alien2utoo at
Mon Feb 29 08:22:44 EST 2016

Hello Rustom,

F5 in Idle restarts the Python interpreter (that's what my impression is). Whatever you have done earlier at Idle prompt (in Idle session) before F5 is gone after F5.

Try simple experiment at prompt.

>>> myvar="hello"
>>> myvar

myvar is gone after F5.

As for need of import in Idle session, I use it to
- import sys
- sys.append.path('D:\\Where\\Ever\\My\\Modules\\Lie')
- import mymodule

More information about the Python-list mailing list