示例#1
0
 def write_settings(self):
     cfgname = get_config_name()
     c = new_config()
     c.add_section(CONFIG_SECTION)
     for s in self.settings:
         c.set(CONFIG_SECTION, s.name, str(s.value))
         s.dirty = False
     safe_write_config(cfgname, c)
示例#2
0
 def save_to_ini_file(self, fname):
     c = new_config()
     if self.save_to_config_section(c):
         if safe_write_config(fname, c):
             self.dirty = False