summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-11 20:00:23 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 10:26:53 (GMT)
commit50329de838bc278652dbbc464a806e1bf25c1ee4 (patch)
treea1b6bde70c0d8e960e2c6d106dc0609888104a39
parent88f019b7f2480c95bb193f909920913975bfaedf (diff)
csv: new first column with "2" or "3" for python dialect
-rw-r--r--src/game.py6
-rwxr-xr-xsrc/kajonggtest.py7
2 files changed, 8 insertions, 5 deletions
diff --git a/src/game.py b/src/game.py
index 48ce209..d54335c 100644
--- a/src/game.py
+++ b/src/game.py
@@ -31,6 +31,7 @@ from twisted.internet.defer import succeed
from util import stack, gitHead
from log import logError, logWarning, logException, logDebug, m18n
from common import WINDS, Internal, IntDict, Debug, Options, unicodeString
+from common import isPython3
from query import Query
from rule import Ruleset
from tile import Tile, elements
@@ -886,8 +887,9 @@ class PlayingGame(Game):
resource.RUSAGE_SELF).ru_maxrss)
if Options.rounds:
self.csvTags.append('ROUNDS:%s' % Options.rounds)
- row = [self.ruleset.name, Options.AI, gitHead(), str(self.seed),
- ','.join(self.csvTags)]
+ row = [self.ruleset.name, Options.AI,
+ gitHead(), '3' if isPython3 else '2',
+ str(self.seed), ','.join(self.csvTags)]
for player in sorted(self.players, key=lambda x: x.name):
row.append(player.name)
row.append(player.balance)
diff --git a/src/kajonggtest.py b/src/kajonggtest.py
index 28c2b39..5c2f488 100755
--- a/src/kajonggtest.py
+++ b/src/kajonggtest.py
@@ -43,9 +43,10 @@ from compat import Csv, CsvWriter
RULESETFIELD = 0
AIFIELD = 1
COMMITFIELD = 2
-GAMEFIELD = 3
-TAGSFIELD = 4
-PLAYERSFIELD = 5
+PYTHON23FIELD = 3
+GAMEFIELD = 4
+TAGSFIELD = 5
+PLAYERSFIELD = 6
OPTIONS = None