def __init__(self, instance):
"""
Initiate registry with pre-loaded apps.
:param instance: Instance of the controller.
:type instance: pyplanet.core.instance.Instance
"""
self.instance = instance
self.apps = OrderedDict()
self.unloaded_apps = OrderedDict()
# Set ready states.
self.apps_ready = self.ready = False
# Set a lock for threading.
self._lock = threading.Lock()
# Listen to events
self.instance.signals.listen('contrib.mode:script_mode_changed', self._on_mode_change)
评论列表
文章目录