I'm trying to understand how my workflow can work with Python and IDLE.
Suppose I write a function:
def hello():
print 'hello!'
I save the file as greetings.py
. Then in IDLE, I test the function:
>>> from greetings import *
>>> hello()
hello!
Then I alter the program, and want to try hello()
again. So I reload
:
>>> reload(greetings)
<module 'greetings' from '/path/to/file/greetings.py'>
Yet the change is not picked up. What am I doing wrong? How do I reload an altered module?
I've been reading a number of related questions on SO, but none of the answers have helped me.
ctrl + f6
will restart your session as well. – Undersigned