I'm looking for a way to create a “PyhtonModule” event handler in a fresh HDA using Python. So far I have not found a way of doing this.
I am able to create a new section in the HDA containing Python code. However, if I want to access the code, I must manually create a PythonModule Event Handler and add: import toolutils bar = toolutils.createModuleFromSection( ‘bar’, kwargs, ‘bar_PythonModule’) if I want to access that code. However, this sort of defeats the point.
Is there a way, using Python, to creating a PythonModule Event Handler and modify its contents?