change print to log
This commit is contained in:
parent
8b28427ff9
commit
a3ec32b7b9
|
@ -24,6 +24,10 @@ Routines for detecting and handling poker client windows for MS Windows.
|
||||||
# Standard Library modules
|
# Standard Library modules
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
import logging
|
||||||
|
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
|
||||||
|
log = logging.getLogger("hud")
|
||||||
|
|
||||||
# pyGTK modules
|
# pyGTK modules
|
||||||
import pygtk
|
import pygtk
|
||||||
import gtk
|
import gtk
|
||||||
|
@ -59,19 +63,19 @@ class Table(Table_Window):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self.window == None:
|
if self.window == None:
|
||||||
print "Window %s not found. Skipping." % search_string
|
log.error( "Window %s not found. Skipping." % search_string )
|
||||||
return None
|
return None
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
print "self.window doesn't exist? why?"
|
log.error( "self.window doesn't exist? why?" )
|
||||||
return None
|
return None
|
||||||
|
|
||||||
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
||||||
print "x = %s y = %s width = %s height = %s" % (x, y, width, height)
|
log.debug("x = %s y = %s width = %s height = %s" % (x, y, width, height))
|
||||||
self.x = int(x) + b_width
|
self.x = int(x) + b_width
|
||||||
self.y = int(y) + tb_height
|
self.y = int(y) + tb_height
|
||||||
self.width = width - x
|
self.width = width - x
|
||||||
self.height = height - y
|
self.height = height - y
|
||||||
print "x = %s y = %s width = %s height = %s" % (self.x, self.y, self.width, self.height)
|
log.debug("x = %s y = %s width = %s height = %s" % (self.x, self.y, self.width, self.height))
|
||||||
#self.height = int(height) - b_width - tb_height
|
#self.height = int(height) - b_width - tb_height
|
||||||
#self.width = int(width) - 2*b_width
|
#self.width = int(width) - 2*b_width
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user