more string unification
This commit is contained in:
parent
23818e0c6b
commit
792b110ee1
|
@ -196,7 +196,7 @@ class Betfair(HandHistoryConverter):
|
|||
elif action.group('ATYPE') == 'checks':
|
||||
hand.addCheck( street, action.group('PNAME'))
|
||||
else:
|
||||
sys.stderr.write( _("DEBUG: unimplemented readAction: '%s' '%s'") %(action.group('PNAME'),action.group('ATYPE'),))
|
||||
sys.stderr.write(_("DEBUG: ") + _("unimplemented readAction: '%s' '%s'") % (action.group('PNAME'),action.group('ATYPE')))
|
||||
|
||||
|
||||
def readShowdownActions(self, hand):
|
||||
|
|
|
@ -77,7 +77,7 @@ class Filters(threading.Thread):
|
|||
self.mainVBox = gtk.VBox(False, 0)
|
||||
self.sw.add_with_viewport(self.mainVBox)
|
||||
self.sw.show()
|
||||
print _("DEBUG: New packing box created!")
|
||||
print(_("DEBUG: ") + _("New packing box created!"))
|
||||
|
||||
self.found = {'nl':False, 'fl':False, 'pl':False, 'cn':False, 'ring':False, 'tour':False}
|
||||
self.label = {}
|
||||
|
|
|
@ -200,7 +200,7 @@ class GuiAutoImport (threading.Thread):
|
|||
for site in the_sites:
|
||||
params = self.config.get_site_parameters(site)
|
||||
if params['enabled'] == True:
|
||||
print "DEBUG: Detecting hh directory for site: '%s'" % site
|
||||
print (_("DEBUG: ") + _("Detecting hh directory for site: '%s'") % site)
|
||||
if os.name == 'posix':
|
||||
if self.posix_detect_hh_dirs(site):
|
||||
#data[1].set_text(dia_chooser.get_filename())
|
||||
|
|
|
@ -134,7 +134,7 @@ class GuiPositionalStats (threading.Thread):
|
|||
def toggleCallback(self, widget, data=None):
|
||||
# print "%s was toggled %s" % (data, ("OFF", "ON")[widget.get_active()])
|
||||
self.activesite = data
|
||||
print _("DEBUG: activesite set to %s") %(self.activesite)
|
||||
print (_("DEBUG: ") + _("activesite set to %s") % (self.activesite))
|
||||
|
||||
def refreshStats(self, widget, data):
|
||||
try: self.stats_vbox.destroy()
|
||||
|
|
|
@ -218,25 +218,25 @@ Against the range: {
|
|||
self.outputlabel.set_text(string)
|
||||
|
||||
def set_board_flop(self, caller, widget):
|
||||
print _("DEBUG: called set_board_flop: '%s' '%s'") %(caller ,widget)
|
||||
print (_("DEBUG: ") + _("called set_board_flop: '%s' '%s'") % (caller ,widget))
|
||||
self.boardtext = widget.get_text()
|
||||
|
||||
def set_hero_cards_flop(self, caller, widget):
|
||||
print _("DEBUG: called set_hero_cards_flop")
|
||||
print (_("DEBUG: ") + _("called set_hero_cards_flop"))
|
||||
self.herorange = widget.get_text()
|
||||
|
||||
def set_villain_cards_flop(self, caller, widget):
|
||||
print _("DEBUG: called set_villain_cards_flop")
|
||||
print (_("DEBUG: ") + _("called set_villain_cards_flop"))
|
||||
self.villainrange = widget.get_text()
|
||||
|
||||
def update_flop_output_pane(self, caller, widget):
|
||||
print _("DEBUG: called update_flop_output_pane")
|
||||
print (_("DEBUG: ") + _("called update_flop_output_pane"))
|
||||
self.stove.set_board_string(self.boardtext)
|
||||
self.stove.set_hero_cards_string(self.herorange)
|
||||
self.stove.set_villain_range_string(self.villainrange)
|
||||
print _("DEBUG: odds_for_range")
|
||||
print (_("DEBUG: ") + ("odds_for_range"))
|
||||
self.ev = Stove.odds_for_range(self.stove)
|
||||
print _("DEBUG: set_output_label")
|
||||
print (_("DEBUG: ") + ("set_output_label"))
|
||||
self.set_output_label(self.ev.output)
|
||||
|
||||
|
||||
|
|
|
@ -475,12 +475,12 @@ If a player has None chips he won't be added."""
|
|||
tmp = self.handText[0:100]
|
||||
log.error(_("markstreets didn't match - Assuming hand %s was cancelled") % self.handid)
|
||||
self.cancelled = True
|
||||
raise FpdbParseError(_("FpdbParseError: markStreets appeared to fail: First 100 chars: '%s'") % tmp)
|
||||
raise FpdbParseError(_("markStreets appeared to fail: First 100 chars: '%s'") % tmp)
|
||||
|
||||
def checkPlayerExists(self,player):
|
||||
if player not in [p[1] for p in self.players]:
|
||||
print (_("DEBUG: checkPlayerExists %s fail on hand number %s") % (player, self.handid))
|
||||
raise FpdbParseError(_("checkPlayerExists: '%s fail on hand number %s") % (player, self.handid))
|
||||
print (_("DEBUG: ") + _("checkPlayerExists: %s fail on hand number %s") % (player, self.handid))
|
||||
raise FpdbParseError(_("checkPlayerExists: %s fail on hand number %s") % (player, self.handid))
|
||||
|
||||
def setCommunityCards(self, street, cards):
|
||||
log.debug("setCommunityCards %s %s" %(street, cards))
|
||||
|
@ -1687,9 +1687,9 @@ class Pot(object):
|
|||
if self.sym is None:
|
||||
self.sym = "C"
|
||||
if self.total is None:
|
||||
print _("DEBUG: call Pot.end() before printing pot total")
|
||||
print (_("DEBUG: ") + _("call Pot.end() before printing pot total"))
|
||||
# NB if I'm sure end() is idempotent, call it here.
|
||||
raise FpdbParseError(_("FpdbError in printing Hand object"))
|
||||
raise FpdbParseError(_("Error in printing Hand object"))
|
||||
|
||||
ret = "Total pot %s%.2f" % (self.sym, self.total)
|
||||
if len(self.pots) < 2:
|
||||
|
|
|
@ -41,7 +41,7 @@ def splitPokerStarsSummaries(summaryText): #TODO: this needs to go to PSS.py
|
|||
splitSummaries = re.split(re_SplitTourneys, summaryText)
|
||||
|
||||
if len(splitSummaries) <= 1:
|
||||
print _("DEBUG: re_SplitTourneys isn't matching")
|
||||
print (_("DEBUG: ") + _("re_SplitTourneys isn't matching"))
|
||||
|
||||
return splitSummaries
|
||||
|
||||
|
@ -50,7 +50,7 @@ def splitFullTiltSummaries(summaryText):#TODO: this needs to go to FTPS.py
|
|||
splitSummaries = re.split(re_SplitTourneys, summaryText)
|
||||
|
||||
if len(splitSummaries) <= 1:
|
||||
print _("DEBUG: re_SplitTourneys isn't matching")
|
||||
print(_("DEBUG: ") + _("re_SplitTourneys isn't matching"))
|
||||
|
||||
return splitSummaries
|
||||
|
||||
|
@ -64,7 +64,7 @@ def run(config, db):
|
|||
else:
|
||||
server = IMAP4(config.host)
|
||||
response = server.login(config.username, config.password) #TODO catch authentication error
|
||||
print _("response to logging in:"),response
|
||||
print(_("response to logging in: "), response)
|
||||
#print "server.list():",server.list() #prints list of folders
|
||||
|
||||
response = server.select(config.folder)
|
||||
|
|
|
@ -334,7 +334,7 @@ class OnGame(HandHistoryConverter):
|
|||
elif action.group('ATYPE') == ' stands pat':
|
||||
hand.addStandsPat( street, action.group('PNAME'))
|
||||
else:
|
||||
print _("DEBUG: unimplemented readAction: '%s' '%s'") %(action.group('PNAME'),action.group('ATYPE'),)
|
||||
print (_("DEBUG: ") + _("unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE')))
|
||||
|
||||
def readShowdownActions(self, hand):
|
||||
for shows in self.re_ShowdownAction.finditer(hand.handText):
|
||||
|
|
|
@ -436,7 +436,7 @@ class PokerStars(HandHistoryConverter):
|
|||
elif action.group('ATYPE') == ' stands pat':
|
||||
hand.addStandsPat( street, action.group('PNAME'))
|
||||
else:
|
||||
print _("DEBUG: unimplemented readAction: '%s' '%s'") %(action.group('PNAME'),action.group('ATYPE'),)
|
||||
print (_("DEBUG: ") + _("unimplemented readAction: '%s' '%s'") % (action.group('PNAME'),action.group('ATYPE')))
|
||||
|
||||
|
||||
def readShowdownActions(self, hand):
|
||||
|
|
|
@ -403,7 +403,7 @@ class Winamax(HandHistoryConverter):
|
|||
elif action.group('ATYPE') == ' stands pat':
|
||||
hand.addStandsPat( street, action.group('PNAME'))
|
||||
else:
|
||||
log.fatal(_("DEBUG: unimplemented readAction: '%s' '%s'")) %(action.group('PNAME'),action.group('ATYPE'),)
|
||||
log.fatal(_("DEBUG: ") + _("unimplemented readAction: '%s' '%s'") % (action.group('PNAME'),action.group('ATYPE')))
|
||||
# print "Processed %s"%acts
|
||||
# print "committed=",hand.pot.committed
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ def testSQLiteVarianceFunction():
|
|||
cur.execute("SELECT variance(i) from test")
|
||||
result = cur.fetchone()[0]
|
||||
|
||||
print _("DEBUG: Testing variance function")
|
||||
print _("DEBUG: result: %s expecting: 0.666666 (result-expecting ~= 0.0): %s") % (result, (result - 0.66666))
|
||||
print (_("DEBUG: ") + _("Testing variance function"))
|
||||
print (_("DEBUG: ") + _("result: %s expecting: 0.666666 (result-expecting ~= 0.0): %s") % (result, (result - 0.66666)))
|
||||
cur.execute("DROP TABLE test")
|
||||
assert (result - 0.66666) <= 0.0001
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user