3 from importlib.machinery
import SourceFileLoader
8 old_sys_argv = sys.argv[:]
9 sys.argv = [filename]+args
11 loader = SourceFileLoader(
"pycfg", filename)
12 mod = types.ModuleType(loader.name)
13 loader.exec_module(mod)
16 if old_sys_argv
is not None:
17 sys.argv = old_sys_argv