Update fimport.py for importlib module syntax
This commit is contained in:
@@ -19,7 +19,7 @@ def fimport( filePath ):
|
|||||||
rootName, ext = os.path.splitext( fileName )
|
rootName, ext = os.path.splitext( fileName )
|
||||||
|
|
||||||
# Create a new module and exec the code in it's context.
|
# Create a new module and exec the code in it's context.
|
||||||
m = imp.new_module( rootName )
|
m = importlib.import_module( rootName )
|
||||||
m.__file__ = absPath
|
m.__file__ = absPath
|
||||||
exec(code, m.__dict__)
|
exec(code, m.__dict__)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user