Beispiel #1
0
 def main(self):
     self.parse_args()
     self.save = SaveFile(self.args.filename)
     #self._read_index()
     self.game = Game()
     self.game.read_file(self.save)
     print str(self.game)
Beispiel #2
0
	def main(self):
		self.parse_args()
		self.save = SaveFile(self.args.filename)
		#self._read_index()
		self.game = Game()
		self.game.read_file(self.save)
		print str(self.game)
Beispiel #3
0
class Program(object):
	def __init__(self):
		self.offset = 0
		
	def main(self):
		self.parse_args()
		self.save = SaveFile(self.args.filename)
		#self._read_index()
		self.game = Game()
		self.game.read_file(self.save)
		print str(self.game)
		
	def parse_args(self):
		parser = argparse.ArgumentParser()
		parser.add_argument('filename', type = argparse.FileType('rb'), help = 'File to edit')

		self.args = parser.parse_args()
Beispiel #4
0
class Program(object):
    def __init__(self):
        self.offset = 0

    def main(self):
        self.parse_args()
        self.save = SaveFile(self.args.filename)
        #self._read_index()
        self.game = Game()
        self.game.read_file(self.save)
        print str(self.game)

    def parse_args(self):
        parser = argparse.ArgumentParser()
        parser.add_argument('filename',
                            type=argparse.FileType('rb'),
                            help='File to edit')

        self.args = parser.parse_args()