From abf489f0c62b7b7473b4f111ee64f577462be7fe Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Wed, 25 Feb 2009 14:14:42 +0000 Subject: [PATCH] need re.MULTILINE and not to have syntax errors --- pyfpdb/FulltiltToFpdb.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index aa0e3141..1fe4ea9e 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -37,17 +37,17 @@ class FullTilt(HandHistoryConverter): def compile_player_regexs(self): player_re = "(?P" + "|".join(map(re.escape, self.players)) + ")" - #print "DEBUG player_re: " + player_re - self.re_PostSB = re.compile(r"^%s posts the small blind of \$?(?P[.0-9]+)", player_re) - self.re_PostBB = re.compile(r"^%s posts (the big blind of )?\$?(?P[.0-9]+)", player_re) - self.re_BringIn = re.compile(r"^%s brings in for \$?(?P[.0-9]+)", player_re) - self.re_PostBoth = re.compile(r"^%s posts small \& big blinds \[\$? (?P[.0-9]+)", player_re) - self.re_HeroCards = re.compile(r"^Dealt to %s \[(?P.*)\]( \[(?P.*\])?", player_re) - self.re_Action = re.compile(r"^%s(?P bets| checks| raises to| calls| folds)(\s\$(?P[.\d]+))?", player_re) - self.re_ShowdownAction = re.compile(r"^%s shows \[(?P.*)\]", player_re) - self.re_CollectPot = re.compile(r"^Seat (?P[0-9]+): %s (\(button\) |\(small blind\) |\(big blind\) )?(collected|showed \[.*\] and won) \(\$(?P[.\d]+)\)(, mucked| with.*)", player_re) - self.re_SitsOut = re.compile(r"^%s sits out", player_re) - self.re_ShownCards = re.compile(r"^Seat (?P[0-9]+): %s \(.*\) showed \[(?P.*)\].*", player_re) + print "DEBUG player_re: " + player_re + self.re_PostSB = re.compile(r"^%s posts the small blind of \$?(?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_PostBB = re.compile(r"^%s posts (the big blind of )?\$?(?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_BringIn = re.compile(r"^%s brings in for \$?(?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_PostBoth = re.compile(r"^%s posts small \& big blinds \[\$? (?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_HeroCards = re.compile(r"^Dealt to %s \[(?P.*)\]( \[(?P.*)\])?" % player_re, re.MULTILINE) + self.re_Action = re.compile(r"^%s(?P bets| checks| raises to| calls| folds)(\s\$(?P[.\d]+))?" % player_re, re.MULTILINE) + self.re_ShowdownAction = re.compile(r"^%s shows \[(?P.*)\]" % player_re, re.MULTILINE) + self.re_CollectPot = re.compile(r"^Seat (?P[0-9]+): %s (\(button\) |\(small blind\) |\(big blind\) )?(collected|showed \[.*\] and won) \(\$(?P[.\d]+)\)(, mucked| with.*)" % player_re, re.MULTILINE) + self.re_SitsOut = re.compile(r"^%s sits out" % player_re, re.MULTILINE) + self.re_ShownCards = re.compile(r"^Seat (?P[0-9]+): %s \(.*\) showed \[(?P.*)\].*" % player_re, re.MULTILINE) def readSupportedGames(self):