Variable Configvariable_configimport ConfigParserself._$(id)_config = ConfigParser.ConfigParser()
self._$(id)_config.read($config_file)
try: $(id) = self._$(id)_config.$(type.get)($section, $option)
except: $(id) = $value
self.$(id) = $(id)self.set_$(id)($value)self._$(id)_config = ConfigParser.ConfigParser()
self._$(id)_config.read($config_file)
if not self._$(id)_config.has_section($section):
self._$(id)_config.add_section($section)
self._$(id)_config.set($section, $option, str($writeback))
self._$(id)_config.write(open($config_file, 'w'))Default Valuevalue0$typeTypetyperealenumConfig Fileconfig_filedefaultfile_openSectionsectionmainstringOptionoptionkeystringWriteBackwritebackNoneraw
This block represents a variable that can be read from a config file.
To save the value back into the config file: \
enter the name of another variable into the writeback param. \
When the other variable is changed at runtime, the config file will be re-written.