def setup_notebook(self, id): try: module = MLOADER.get_module(id) page = module() except ModuleKeyError: pass except SystemError, e: page = create_broken_module_class(id)()
def _load_module(self, name): feature, module = ModuleLoader.search_module_for_name(name) if module: self.select_target_feature(feature) if name in self.loaded_modules: module, index = self.get_module_and_index(name) else: try: page = module() except Exception, e: log.error(e) module = create_broken_module_class(name) page = module() page.show_all() index = self.notebook.append_page(page, Gtk.Label(label=name)) self._save_loaded_info(name, module, index) self.navigation_dict[feature] = name, None self.set_current_module(module, index) self.update_jump_buttons()