LANGUAGE/Python
Reload Module and Function in PyThon
Hogeony
2019. 7. 16. 10:32
import importlib, MyModule
importlib.reload(MyModule)
from MyModule import *
from MyModule import MyFunction
import sys, importlib
importlib.reload(sys.modules['foo'])
from foo import bar
#References
https://stackoverflow.com/questions/7271082/how-to-reload-a-modules-function-in-python
How to reload a module's function in Python?
Following up on this question regarding reloading a module, how do I reload a specific function from a changed module? pseudo-code: from foo import bar if foo.py has changed: reload bar
stackoverflow.com