summaryrefslogtreecommitdiff
path: root/src/python/stdlib/lib-tk/test/test_ttk/support.py
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-26 13:50:50 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-26 13:50:50 (GMT)
commite46ef289e142982d7bd592faa7b0f85470364c01 (patch)
treecda253e03788f7db0a7cdcd05662f66b4455e298 /src/python/stdlib/lib-tk/test/test_ttk/support.py
parentd0d0d62bbcbb5c3417f8cba419c83bac192ea985 (diff)
downloadpowder-e46ef289e142982d7bd592faa7b0f85470364c01.zip
powder-e46ef289e142982d7bd592faa7b0f85470364c01.tar.gz
Remove Python console stuff
Diffstat (limited to 'src/python/stdlib/lib-tk/test/test_ttk/support.py')
-rw-r--r--src/python/stdlib/lib-tk/test/test_ttk/support.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/python/stdlib/lib-tk/test/test_ttk/support.py b/src/python/stdlib/lib-tk/test/test_ttk/support.py
deleted file mode 100644
index 57e7803..0000000
--- a/src/python/stdlib/lib-tk/test/test_ttk/support.py
+++ /dev/null
@@ -1,33 +0,0 @@
-import Tkinter
-
-def get_tk_root():
- try:
- root = Tkinter._default_root
- except AttributeError:
- # it is possible to disable default root in Tkinter, although
- # I haven't seen people doing it (but apparently someone did it
- # here).
- root = None
-
- if root is None:
- # create a new master only if there isn't one already
- root = Tkinter.Tk()
-
- return root
-
-def root_deiconify():
- root = get_tk_root()
- root.deiconify()
-
-def root_withdraw():
- root = get_tk_root()
- root.withdraw()
-
-
-def simulate_mouse_click(widget, x, y):
- """Generate proper events to click at the x, y position (tries to act
- like an X server)."""
- widget.event_generate('<Enter>', x=0, y=0)
- widget.event_generate('<Motion>', x=x, y=y)
- widget.event_generate('<ButtonPress-1>', x=x, y=y)
- widget.event_generate('<ButtonRelease-1>', x=x, y=y)