1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/python import importlib, pprint, sys pprint.pprint(sys.path) name = "mwparserfromhell" try: importlib.import_module(name) print("import success: " + name) except ImportError: print("import error: " + name)