#! Under /usr/bin/env python unix the bin table of contents, python procedure
import wx the wxPython window, must import wx kind of
app = wx.PySimpleApp( PysimpleApp( be wx simple App procedure class
frame = wx. Frame (None, wx.ID_ANY, “Hello World”
frame. Show(True
app.MainLoop(
simple wxPython, explained that,
first must use the wxPython development application procedure, must install wxPython,
http://wxpython.org downloading to correspond python edition wxPython, (2.8-Py25 having more than enough, always has problems? Was inferior with 2.6-Py25, this cannot have problems, moreover may run Boa IDE.Installed, might write the wxPython window procedure!
wxPython under the site-packages table of contents is wx-2.6-msw-unicode,2.6 is the edition number! Under the table of contents has 3 sub-tables of contents,
wxPython Lib and the Tools tool, the resources, attach module
wx Core core some kind of
doc the documents
simple procedure probably are such:
1 import wx, inducts wx module
2 to construct the app object, the application procedure object, above code has used PySimpleApp(
3 under app, adds Frame, certainly wants frame. Show(True to let the window demonstrate
4. app.MainLoop( lets app carry out the circulation, after each window procedure movement all is falls into sleep, waited for the event the occurrence, cannot cause to dodge then switches off!
the GUI programming, basically all is that set, has various window, like Frame, dialog box and so on, in the windows has various module, the button, the label, the text frame, Shan Xuan, reelection, menu and so on,
also must have the event to process the mechanism, has the operation on the window module, must correspond corresponding event processing!