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)
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.__init__.pyo.40009 | File | 140 B | 0644 |
|
.support.pyo.40009 | File | 1.32 KB | 0644 |
|
.test_extensions.pyo.40009 | File | 8.23 KB | 0644 |
|
.test_functions.pyo.40009 | File | 15.29 KB | 0644 |
|
.test_style.pyo.40009 | File | 3.07 KB | 0644 |
|
.test_widgets.pyo.40009 | File | 37.2 KB | 0644 |
|
__init__.py | File | 0 B | 0644 |
|
__init__.pyc | File | 140 B | 0644 |
|
__init__.pyo | File | 140 B | 0644 |
|
support.py | File | 901 B | 0644 |
|
support.pyc | File | 1.32 KB | 0644 |
|
support.pyo | File | 1.32 KB | 0644 |
|
test_extensions.py | File | 8.97 KB | 0644 |
|
test_extensions.pyc | File | 8.23 KB | 0644 |
|
test_extensions.pyo | File | 8.23 KB | 0644 |
|
test_functions.py | File | 17.06 KB | 0644 |
|
test_functions.pyc | File | 15.29 KB | 0644 |
|
test_functions.pyo | File | 15.29 KB | 0644 |
|
test_style.py | File | 2.7 KB | 0644 |
|
test_style.pyc | File | 3.07 KB | 0644 |
|
test_style.pyo | File | 3.07 KB | 0644 |
|
test_widgets.py | File | 38.94 KB | 0644 |
|
test_widgets.pyc | File | 37.2 KB | 0644 |
|
test_widgets.pyo | File | 37.2 KB | 0644 |
|