MCPcopy Index your code
hub / github.com/kivy/python-for-android / load_source

Function load_source

pythonforandroid/util.py:88–99  ·  view source on GitHub ↗
(module, filename)

Source from the content-addressed store, hash-verified

86
87
88def 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
102class BuildInterruptingException(Exception):

Callers 3

hookMethod · 0.90
_build_packageMethod · 0.90
setUpMethod · 0.90

Calls

no outgoing calls

Tested by 1

setUpMethod · 0.72