Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* Output redirection (instead of print)
* Provides a self de-initialization of the used module
* Reload the module with code changes
* Get your own configuration (for save)
* Get name of status variables
* Get status variables
* Reload module data (from saved variables)
"""
_modclass = 'base'
_modtype = 'base'
_threaded = False
_connectors = dict()
# do not copy declaration of trigger(self, event, *args, **kwargs), just apply Slot decorator
trigger = QtCore.Slot(str, result=bool)(Fysom.trigger)
# signals
sigStateChanged = QtCore.Signal(object) # (module name, state change)
def __init__(self, manager, name, config=None, callbacks=None, **kwargs):
""" Initialise Base class object and set up its state machine.
@param object self: tthe object being initialised
@param object manager: the manager object that
@param str name: unique name for this object
@param dict configuration: parameters from the configuration file
@param dict callbacks: dictionary specifying functions to be run
on state machine transitions
"""
if config is None: