def loadconfig(self): config = ConfigObj(self.drivepath+'/sync.ini') for item in config.iterkeys(): setattr(self, item, config[item])