diff options
Diffstat (limited to 'toisto-proto.py')
-rwxr-xr-x | toisto-proto.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/toisto-proto.py b/toisto-proto.py index b4c8512..bf60eff 100755 --- a/toisto-proto.py +++ b/toisto-proto.py @@ -22,7 +22,12 @@ OLPC_CROSS = 259 OLPC_SQUARE = 263 OLPC_CHECK = 257 -with file("data/ipa/index") as infile: +try: + LANGUAGE = sys.argv[1] +except IndexError: + LANGUAGE = "ipa" + +with file("data/%s/index" % LANGUAGE) as infile: lines = infile.read().decode("utf-8").split("\n") entries = [line.split() for line in lines if line] @@ -66,7 +71,7 @@ class Game(object): def stats(self): gametime = time.time() - self.time0 return ["This is a prototype", - "Language: IPA", + "Language: %s" % LANGUAGE, "Game time: %d:%02d" % (gametime / 60, gametime % 60), "Score: %d" % self.score, "Questions: %d" % self.round, |