Merge branch 'master' of git://git.assembla.com/free_poker_tools
This commit is contained in:
commit
e8155123b2
|
@ -44,13 +44,19 @@ class Table(Table_Window):
|
|||
|
||||
def find_table_parameters(self):
|
||||
|
||||
reg = '''
|
||||
\s+(?P<XID>[\dxabcdef]+) # XID in hex
|
||||
\s(?P<TITLE>.+): # window title
|
||||
'''
|
||||
|
||||
self.number = None
|
||||
for listing in os.popen('xwininfo -root -tree').readlines():
|
||||
if re.search(self.search_string, listing, re.I):
|
||||
mo = re.match('\s+([\dxabcdef]+) (.+):\s\(\"([a-zA-Z0-9\-.]+)\".+ (\d+)x(\d+)\+\d+\+\d+ \+(\d+)\+(\d+)', listing)
|
||||
title = re.sub('\"', '', mo.group(2))
|
||||
mo = re.match(reg, listing, re.VERBOSE)
|
||||
# mo = re.match('\s+([\dxabcdef]+) (.+):\s\(\"([a-zA-Z0-9\-.]+)\".+ (\d+)x(\d+)\+\d+\+\d+ \+(\d+)\+(\d+)', listing)
|
||||
title = re.sub('\"', '', mo.groupdict()["TITLE"])
|
||||
if self.check_bad_words(title): continue
|
||||
self.number = int( mo.group(1), 0)
|
||||
self.number = int( mo.groupdict()["XID"], 0 )
|
||||
self.title = title
|
||||
self.hud = None # specified later
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue
Block a user