slight formatting changes to agree with PEP8 moar closely
This commit is contained in:
parent
4b3fe3dfa2
commit
bfec231b5d
|
@ -64,14 +64,16 @@ import locale
|
|||
lang = locale.getdefaultlocale()[0][0:2]
|
||||
print "lang:", lang
|
||||
if lang == "en":
|
||||
def _(string): return string
|
||||
def _(string):
|
||||
return string
|
||||
else:
|
||||
import gettext
|
||||
try:
|
||||
trans = gettext.translation("fpdb", localedir="locale", languages=[lang])
|
||||
trans.install()
|
||||
except IOError:
|
||||
def _(string): return string
|
||||
def _(string):
|
||||
return string
|
||||
|
||||
# get config and set up logger
|
||||
c = Configuration.Config(file=options.config, dbname=options.dbname)
|
||||
|
@ -295,8 +297,8 @@ class HUD_main(object):
|
|||
self.db_connection.init_hud_stat_vars( self.hud_dict[temp_key].hud_params['hud_days']
|
||||
, self.hud_dict[temp_key].hud_params['h_hud_days'])
|
||||
t2 = time.time()
|
||||
stat_dict = self.db_connection.get_stats_from_hand(new_hand_id, type, self.hud_dict[temp_key].hud_params
|
||||
,self.hero_ids[site_id], num_seats)
|
||||
stat_dict = self.db_connection.get_stats_from_hand(new_hand_id, type, self.hud_dict[temp_key].hud_params,
|
||||
self.hero_ids[site_id], num_seats)
|
||||
t3 = time.time()
|
||||
|
||||
try:
|
||||
|
@ -321,8 +323,8 @@ class HUD_main(object):
|
|||
else:
|
||||
# get stats using default params--also get cards
|
||||
self.db_connection.init_hud_stat_vars( self.hud_params['hud_days'], self.hud_params['h_hud_days'] )
|
||||
stat_dict = self.db_connection.get_stats_from_hand(new_hand_id, type, self.hud_params
|
||||
,self.hero_ids[site_id], num_seats)
|
||||
stat_dict = self.db_connection.get_stats_from_hand(new_hand_id, type, self.hud_params,
|
||||
self.hero_ids[site_id], num_seats)
|
||||
cards = self.db_connection.get_cards(new_hand_id)
|
||||
comm_cards = self.db_connection.get_common_cards(new_hand_id)
|
||||
if comm_cards != {}: # stud!
|
||||
|
|
|
@ -53,6 +53,7 @@ import Mucked
|
|||
import Database
|
||||
#import HUD_main
|
||||
|
||||
|
||||
def importName(module_name, name):
|
||||
"""Import a named object 'name' from module 'module_name'."""
|
||||
# Recipe 16.3 in the Python Cookbook, 2nd ed. Thanks!!!!
|
||||
|
@ -63,8 +64,8 @@ def importName(module_name, name):
|
|||
return None
|
||||
return(getattr(module, name))
|
||||
|
||||
class Hud:
|
||||
|
||||
class Hud:
|
||||
def __init__(self, parent, table, max, poker_game, config, db_connection):
|
||||
# __init__ is (now) intended to be called from the stdin thread, so it
|
||||
# cannot touch the gui
|
||||
|
@ -83,7 +84,6 @@ class Hud:
|
|||
self.mw_created = False
|
||||
self.hud_params = parent.hud_params
|
||||
|
||||
|
||||
self.stat_windows = {}
|
||||
self.popup_windows = {}
|
||||
self.aux_windows = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user