def _load_all_profiles(self): for d in self.directories: for profile in os.listdir(d): if os.path.isdir(d + '/' + profile): try: self.profiles[profile] = p.Profile( profile, self.load_profile_config(profile, d)) except configobj.ParseError: pass
def _load_all_profiles(self): for d in self.directories: for profile in os.listdir(d): if self._is_dir_profile(os.path.join(d, profile)): try: self.profiles[profile] = p.Profile(profile, self.load_profile_config(profile, d)) except Error: pass
def data_to_profile_config(self): name = self.entry_profile_name.get_text() config = configobj.ConfigObj() activated = self.combobox_include_profile.get_active() model = self.combobox_include_profile.get_model() include = model[activated][0] if self.togglebutton_include_profile.get_active(): config['main'] = {'include': include} for children in self.notebook_plugins: acumulate_options = {} for item in children.get_model(): if item[0] != 'None': acumulate_options[item[1]] = item[0] config[self.notebook_plugins.get_menu_label_text(children)] = \ acumulate_options return profile.Profile(name, config)
def data_to_profile_config(self): name = self._gobj('entryProfileName').get_text() config = configobj.ConfigObj(list_values=False, interpolation=False) activated = self._gobj('comboboxIncludeProfile').get_active() model = self._gobj('comboboxIncludeProfile').get_model() include = model[activated][0] if self._gobj('togglebuttonIncludeProfile').get_active(): config['main'] = {'include': include} for children in self._gobj('notebookPlugins'): acumulate_options = {} for item in children.get_model(): if item[0] != 'None': acumulate_options[item[1]] = item[0] config[self._gobj('notebookPlugins').get_menu_label_text(children)] = \ acumulate_options return profile.Profile(name, config)