def load(self):
    '\n        Load/Reload the plugin and all its callbacks.\n\n        If a plugin has never been loaded it will be loaded normally. If the\n        plugin has been loaded before it will be reloaded only if the file has\n        been modified on disk. In this event callbacks will all be cleared and\n        reloaded.\n\n        General behavior:\n        - Try to load the source of the plugin.\n        - Try to find a function called registerCallbacks in the file.\n        - Try to run the registration function.\n\n        At every step along the way, if any error occurs the whole plugin will\n        be deactivated and the function will return.\n        '
    mtime = os.path.getmtime(self._path)
    if (self._mtime is None):
        self._engine.log.info(('Loading plugin at %s' % self._path))
    elif (self._mtime < mtime):
        self._engine.log.info(('Reloading plugin at %s' % self._path))
    else:
        return
    self._mtime = mtime
    self._callbacks = []
    self._active = True
    try:
        plugin = imp.load_source(self._pluginName, self._path)
    except:
        self._active = False
        self.logger.error('Could not load the plugin at %s.\n\n%s', self._path, traceback.format_exc())
        return
    regFunc = getattr(plugin, 'registerCallbacks', None)
    if callable(regFunc):
        try:
            regFunc(Registrar(self))
        except:
            self._engine.log.critical('Error running register callback function from plugin at %s.\n\n%s', self._path, traceback.format_exc())
            self._active = False
    else:
        self._engine.log.critical('Did not find a registerCallbacks function in plugin at %s.', self._path)
        self._active = False
Load/Reload the plugin and all its callbacks.

If a plugin has never been loaded it will be loaded normally. If the
plugin has been loaded before it will be reloaded only if the file has
been modified on disk. In this event callbacks will all be cleared and
reloaded.

General behavior:
- Try to load the source of the plugin.
- Try to find a function called registerCallbacks in the file.
- Try to run the registration function.

At every step along the way, if any error occurs the whole plugin will
be deactivated and the function will return.
def load(self):
    '\n        Load/Reload the plugin and all its callbacks.\n\n        If a plugin has never been loaded it will be loaded normally. If the\n        plugin has been loaded before it will be reloaded only if the file has\n        been modified on disk. In this event callbacks will all be cleared and\n        reloaded.\n\n        General behavior:\n        - Try to load the source of the plugin.\n        - Try to find a function called registerCallbacks in the file.\n        - Try to run the registration function.\n\n        At every step along the way, if any error occurs the whole plugin will\n        be deactivated and the function will return.\n        '
    mtime = os.path.getmtime(self._path)
    if (self._mtime is None):
        self._engine.log.info(('Loading plugin at %s' % self._path))
    elif (self._mtime < mtime):
        self._engine.log.info(('Reloading plugin at %s' % self._path))
    else:
        return
    self._mtime = mtime
    self._callbacks = []
    self._active = True
    try:
        plugin = imp.load_source(self._pluginName, self._path)
    except:
        self._active = False
        self.logger.error('Could not load the plugin at %s.\n\n%s', self._path, traceback.format_exc())
        return
    regFunc = getattr(plugin, 'registerCallbacks', None)
    if callable(regFunc):
        try:
            regFunc(Registrar(self))
        except:
            self._engine.log.critical('Error running register callback function from plugin at %s.\n\n%s', self._path, traceback.format_exc())
            self._active = False
    else:
        self._engine.log.critical('Did not find a registerCallbacks function in plugin at %s.', self._path)
        self._active = False