Skip to content

Commit 90d9c7d

Browse files
authored
Merge pull request #1167 from mathics/pymathics-onload
adding onload hook to pymathics
2 parents c44678e + 8fbd90b commit 90d9c7d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

mathics/core/definitions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ def load_pymathics_module(self, module, remove_on_quit=True):
162162
for name, item in newsymbols.items():
163163
if name != "System`MakeBoxes":
164164
item.contribute(self, is_pymodule=True)
165+
166+
167+
onload = loaded_module.pymathics_version_data.get("onload", None)
168+
if onload:
169+
onload(self)
170+
165171
return loaded_module
166172

167173
def clear_pymathics_modules(self):

0 commit comments

Comments
 (0)