import ConfigParser, os config = ConfigParser.ConfigParser() config.add_section('zmath') config.set('zmath', 'type', 'main') config.set('zmath', 'name', '') config.set('zmath', 'organisation', '') config.set('zmath', 'city', '') config.set('zmath', 'country', '') config.set('zmath', 'text', '') config.set('zmath', 'image', '') config.read(['/data/zmath/master.cfg','/data/zmath/mirror.cfg']) type = config.get('zmath', 'type')