Skip to content

Commit b198aff

Browse files
authored
Merge pull request #67 from Distributive-Network/Xmader/fix/require-python-module
Fix: Python modules require can't see `exports['abc'] = xyz`
2 parents 7eeaa90 + 31eea2e commit b198aff

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/pythonmonkey/require.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,7 @@ def load(filename: str) -> Dict:
208208
spec.loader.exec_module(module)
209209
else:
210210
module = sys.modules[name]
211-
module_exports = {}
212-
for key in dir(module):
213-
module_exports[key] = getattr(module, key)
214-
return module_exports
211+
return module.exports
215212
globalThis.python.load = load
216213

217214
"""

0 commit comments

Comments
 (0)