2
Allows interpreter and GUI windows to co-exist peacefully.
4
gui_thread runs wxPython in a back ground thread and allows you
5
to create and manipulate wxPython windows from the command line.
8
An example usage follows::
11
>> from gui_thread.examples import SimpleFrame
14
# a window with a button should pop up...
21
# window button should have turned blue.
24
# a 2nd window appears
27
An example usage follows::
29
>> gui_thread.start(use_main=1)
30
<wait several seconds while wxPython starts>
32
>> from gui_thread.examples import SimpleFrame
33
>> prxyMyFrame = gui_thread.register(SimpleFrame)
36
# a window with a button should pop up...
43
# window button should have turned blue.
46
# a 2nd window appears
48
Modules based on gui_thread will also run in wxPython applications
49
without modification. So, by using gui_thread, you can create
50
viewers for common objects that are usable from the standard
51
python interpreter, PythonWin (on MS), and wxPython applications.
52
Since Tkinter and wxPython currently do not coexist well together,
53
IDLE is not compatible with gui_thread.
55
gui_thread should always be the first module you import into an
56
application, unless it is a wxPython app. In that case, it can
57
be imported at any time. When using it in interactive mode, make
58
wait until the "wxPython Imported" message appears before importing
59
any other modules that use wxPython.
62
# New hooks for importing wxPython to its own thread
63
from wxPython_thread import wxPython_thread
66
def start(extra=None,use_main=0):
76
def start_up(src_modname,dst_modname,extra=None):
80
main.start_up(src_modname,dst_modname,extra)
83
def register(wx_class):
87
return main.register(wx_class)