After the bang line, the first step in our simple program is to import the wx module, the main module in the wxPython package. It contains an array of functionality for working with the graphic interface.
import wx
In this guide, we will be using but two classes from the wx library: App and Frame. To get a feel for how many others there are, type the following in a Python shell session:
>>> import wx
>>> dir(wx)
The output will likely scroll off the screen. However, this gives you some idea of the richness of functionality built into the wxPython package.



