well, i figured if i just returned the entire tables array from my discover function just like the original discover function did, then i could just replace the call to it with the call to mine, and be good. here's what i did.
hud_main.py
Code:
table_windows = Tables.discover_table_by_name(config, table_name)
for t in table_windows.keys():
if table_windows[t].name == table_name:
hud_dict[table_name] = Hud.Hud(table_windows[t], max, poker_game, config, db_name)
hud_dict[table_name].create(new_hand_id, config)
hud_dict[table_name].update(new_hand_id, db_connection, config)
break
Tables.py:
Code:
def discover_table_by_name(c, tablename):
sys.stderr.write("discover_table_by_name("+c+" "+tablename+")\n")
sys.stderr.flush()
if os.name == 'posix':
tables = discover_posix_by_name(c, tablename)
elif os.name == 'nt':
tables = discover_nt_by_name(c, tablename)
elif os.name == 'mac':
tables = discover_mac_by_name(c, tablename)
else: tables = { }
sys.stderr.write("tables="+tables+"\n")
return(tables)
The code is actually locking up, as far as I can tell, at the first line of my quote from hud_main.py. I threw in a debug sys.stderr.write, which is getting written, but then as soon as it goes to Tables.py, it locks up the whole window.