Note that the second and subsequent imports did not work when the code itself was edited with another text editor just by reading the module with IPython Notebook etc.
Delete the module you want to load from sys.modules.
fuga.py
import sys
try:
del sys.modules['hoge']
except Exception as e:
pass
import hoge
Recommended Posts