Every time I make a change to a python script I have to reload python and re-import the module. Please advise how I can modify my scripts and run then without having to rela
I found a bypass online. Magic commands exist. It works like a charm for me. The Reload option didn't work for me. Got it from here and point 3 of this link.
Basically all you have to do is the following: and changes you make are reflected automatically after you save.
In [1]: %load_ext autoreload
In [2]: %autoreload 2
In [3]: Import MODULE
In [4]: my_class = Module.class()
my_class.printham()
Out[4]: ham
In [5]: #make changes to printham and save
In [6]: my_class.printham()
Out[6]: hamlet