diff --git a/Docker/src/python/tHome/util/fimport.py b/Docker/src/python/tHome/util/fimport.py index c31e105..faf2047 100644 --- a/Docker/src/python/tHome/util/fimport.py +++ b/Docker/src/python/tHome/util/fimport.py @@ -3,8 +3,9 @@ # Arbitrary file importing utility. Does NOT modify sys.modules # #=========================================================================== -import importlib +#import importlib import os +import types def fimport( filePath ): # Read the file and compile the code. This will fail if the file @@ -19,7 +20,7 @@ def fimport( filePath ): rootName, ext = os.path.splitext( fileName ) # Create a new module and exec the code in it's context. - m = importlib.import_module( rootName ) + m = types.ModuleType( rootName ) m.__file__ = absPath exec(code, m.__dict__)