Answers for "python refresh module"

0

python refresh import

from importlib import reload  
import foo

while True:
    # Do some things.
    if is_changed(foo):
        foo = reload(foo)
Posted by: Guest on May-24-2020
0

reload class module python

import sys
del sys.modules['myfile']
from myfile import MyClass
modifiedmc = MyClass()
Posted by: Guest on December-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language