示例#1
0
 def set_file(self, filename):
     load = self.ini is None
     self.ini = ini = FastINI(filename)
     if load:
         section = self.player.gameData.name
         for i in xrange(self.scoreCount):
             name = ini.get_key(section, 'N%s' % i)
             score = ini.get_key(section, 'S%s' % i)
             if score == '':
                 return
             score = int(score)
             self.scores[i] = (name, score)
示例#2
0
 def load(self, filename):
     path = convert_path(filename)
     self.config = FastINI(path)