diff options
author | nags <nags@nags-desktop.(none)> | 2010-02-23 20:24:08 -0800 |
---|---|---|
committer | nags <nags@nags-desktop.(none)> | 2010-02-23 20:24:08 -0800 |
commit | ad7710b008366239b7d20a871c7dcae103738b87 (patch) | |
tree | adde551b1c1fb083892173b2761d27efcf29c093 /python | |
parent | 869d260751ea0a5459b7b622c1a1cbd1ca0c7d20 (diff) |
glob based window name search
Diffstat (limited to 'python')
-rw-r--r-- | python/ldtputils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/ldtputils.py b/python/ldtputils.py index 69b0825..dd7e12c 100644 --- a/python/ldtputils.py +++ b/python/ldtputils.py @@ -40,6 +40,7 @@ import tempfile import traceback import threading import xml.dom.minidom +from fnmatch import translate as glob_trans # Let us not register our application under at-spi application list os.environ ['GTK_MODULES'] = '' @@ -140,7 +141,7 @@ def imagecapture(winName = None, outFile = None, width = None, screen = wnck.screen_get_default() winid = None for window in screen.get_windows(): - if re.search(winName, window.get_name()): + if re.search(glob_trans(winName), window.get_name()): winid = window.get_xid() # Activate the window # http://faq.pygtk.org/index.py?req=show&file=faq10.027.htp |