From cfbf57dd1befdd5d46c422ef6ba77a266ae5d9a2 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Wed, 11 Mar 2009 14:33:07 +0000 Subject: [PATCH 1/3] if dont have site and BB in lookupLimit table, just halve them for sb,bb. Should work for higher limits almost always anyway, and there are a finite number of ulimits which we should already have in the table --- pyfpdb/Hand.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 8258e49d..b72ef9f1 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -329,7 +329,13 @@ Map the tuple self.gametype onto the pokerstars string describing it "4" : ("1", "2") } } - return betlist[self.sitename][self.bb] + try: + ret = betlist[self.sitename][self.bb] + except: + logging.warning("Don't know the small blind/big blind size for %s, big bet size %s." % (self.sitename, self.bb)) + ret = (Decimal(self.sb)/2,Decimal(self.bb)/2) + + return ret def writeHand(self, fh=sys.__stdout__): From ccb9bc07a7c63aebb20d2667f3cd448a8048bcd5 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Wed, 11 Mar 2009 14:37:31 +0000 Subject: [PATCH 2/3] small t tilted me --- pyfpdb/{PokerStarstoFpdb.py => PokerStarsToFpdb.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pyfpdb/{PokerStarstoFpdb.py => PokerStarsToFpdb.py} (100%) diff --git a/pyfpdb/PokerStarstoFpdb.py b/pyfpdb/PokerStarsToFpdb.py similarity index 100% rename from pyfpdb/PokerStarstoFpdb.py rename to pyfpdb/PokerStarsToFpdb.py From dba348edf38866e10def01dac3bfa551f9fe9917 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Wed, 11 Mar 2009 14:42:49 +0000 Subject: [PATCH 3/3] detect horse:omaha hilo also appears to parse regression-test-files/stars/omahaHL.txt --- pyfpdb/PokerStarsToFpdb.py | 9 +++++---- pyfpdb/test_PokerStars.py | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 3a022d4c..b437e4ce 100755 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -69,7 +69,7 @@ from HandHistoryConverter import * class PokerStars(HandHistoryConverter): # Static regexes - re_GameInfo = re.compile('PokerStars Game #(?P[0-9]+):\s+(HORSE)? \(?(?PHold\'em|Razz|7 Card Stud) (?PNo Limit|Limit|Pot Limit),? \(?(?P\$|)?(?P[.0-9]+)/\$?(?P[.0-9]+)\) - (?P.*$)', re.MULTILINE) + re_GameInfo = re.compile('PokerStars Game #(?P[0-9]+):\s+(HORSE)? \(?(?PHold\'em|Razz|7 Card Stud|Omaha Hi/Lo) (?PNo Limit|Limit|Pot Limit),? \(?(?P\$|)?(?P[.0-9]+)/\$?(?P[.0-9]+)\) - (?P.*$)', re.MULTILINE) re_SplitHands = re.compile('\n\n+') re_HandInfo = re.compile("^Table \'(?P[- a-zA-Z]+)\'(?P.+?$)?", re.MULTILINE) re_Button = re.compile('Seat #(?P