Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import path
- from os import getcwd
- from importlib import import_module
- def import_global_module(name):
- path.remove(getcwd())
- module = import_module(name)
- path.insert(0, getcwd())
- return module
- yourmodule = import_global_module('yourmodule')
- # print(yourmodule)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement