From 36befa43a8b8216d48a3dbe0df51ebd1b4a11b3d Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Mon, 2 Mar 2009 21:48:30 +0000 Subject: [PATCH] More futzing - made it so that Hand.__init__ calls the hhc readX methods in the right order for that kind of Hand (Stud or Holdem/Omaha) - hhc.readX methods then callback Hand.addX methods Why? WHY! I hear you ask. Actually I can see there's very little gain, sorry about that; but it sort of makes sense. Now you just make the right kind of Hand, give it the text and the right kind of HHC filter, and it makes itself. - apart from that, biggest actual thing done is probably in adding player cards for stud hands -- revamped and made it really clear (I think) whats happening (see FullTilt.readStudPlayerCards) When I run FullTiltToFpdf.py it goes through all the hands. - Still have some print statements, have been changing them to logging.debug or logging.info as I come across them. You may find "tail -f logging.out" useful Actually I'm not at all convinced about the use of logging except that you can redirect it to stderr quite easily and then set the threshold for what gets logged quite easily, so that might be a plus. - Oh and the subclassing of Hand is getting clearer. --- pyfpdb/EverleafToFpdb.py | 5 +- pyfpdb/FulltiltToFpdb.py | 201 +++++++++++++++++++++------------ pyfpdb/Hand.py | 144 ++++++++++++----------- pyfpdb/HandHistoryConverter.py | 2 +- 4 files changed, 210 insertions(+), 142 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index d3563dad..7c30e036 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -32,7 +32,6 @@ class Everleaf(HandHistoryConverter): re_Button = re.compile(r"^Seat (?P