Update fimport.py for importlib module syntax

This commit is contained in:
2023-12-22 07:28:30 +00:00
parent 499c6d50da
commit 48f508dee3

View File

@@ -19,7 +19,7 @@ def fimport( filePath ):
rootName, ext = os.path.splitext( fileName )
# 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
exec(code, m.__dict__)