(module, filename)
| 86 | |
| 87 | |
| 88 | def load_source(module, filename): |
| 89 | # Python 3.5+ |
| 90 | import importlib.util |
| 91 | if hasattr(importlib.util, 'module_from_spec'): |
| 92 | spec = importlib.util.spec_from_file_location(module, filename) |
| 93 | mod = importlib.util.module_from_spec(spec) |
| 94 | spec.loader.exec_module(mod) |
| 95 | return mod |
| 96 | else: |
| 97 | # Python 3.3 and 3.4: |
| 98 | from importlib.machinery import SourceFileLoader |
| 99 | return SourceFileLoader(module, filename).load_module() |
| 100 | |
| 101 | |
| 102 | class BuildInterruptingException(Exception): |
no outgoing calls