Python Refresh Importation
from importlib import reload
import foo
while True:
# Do some things.
if is_changed(foo):
foo = reload(foo)
Kind Koala
from importlib import reload
import foo
while True:
# Do some things.
if is_changed(foo):
foo = reload(foo)
import sys
del sys.modules['myfile']
from myfile import MyClass
modifiedmc = MyClass()