A kind of .dll / .so file named _ppms.pyd is created which provides the respective functions.
A Python file named ppms_.py is created, which provides the complete functions from the _ppms.pyd library.
In the Python directory there is the ppms.py Python file which is imported from ppms_.py and extends the code by further functions written in Python.
If you now use an API function which returns a module instance, this module instance will not be returned directly, instead you receive a module subclass: either the class specified in the record from DT405, or the Base standard class.
from ppms import ppms
from ppms.module_subclasses.base_class import Base
from ppms.constants import MENU_FILTER, MENU_RESET, MENU_SAVE
class ModuleThatOverwritesSave(Base):
def menu_override(self, menu_id):
if menu_id == MENU_SAVE:
ppms.ui_message_box('No saving allowed!')
return self.MENU_OVERRIDE_SUCCESS
# Don't allow resetting as that brings up a save prompt
elif menu_id == MENU_RESET:
return self.MENU_OVERRIDE_SUCCESS
return super(ModuleThatOverwritesSave, self).menu_override(menu_id)
JavaScript errors detected
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.