O'Reilly logo

XML Processing with Python by Sean McGrath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17.2. A “Hello World” wxPython Application

All wxPython applications take the same basic shape. Figure 17-11 is a screen shot of a simple wxPython application.

Figure 17-11. A very simple wxPython application.

Here is the code.

 CD-ROM reference=17001.txt # Import wxPython functionality from wxPython.wx import * class MyFrame(wxFrame): def __init__(self, parent, id, title): # Initialize wxFrame wxFrame.__init__(self, parent, -1, title, wxDefaultPosition, wxSize(450, 300)) # Create File, Edit, and Insert menus and menu items. FileMenu = wxMenu() FileMenu.Append (1001,"Exit") menubar = wxMenuBar() menubar.Append (FileMenu,"File") self.SetMenuBar(menubar) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required