Wx Docs For Python Programmers
For the time being wxpython relies on the C++ documentation of wxwidgets. Here are some pointers for the beginners so that they could find the needed information easier.
First, wxpython represents the python bindings for wxwidgets BUT that doesn't mean that it binds everything. A lot of wxwidgets classes have counterparts in the standard python modules. If what you're trying to do is not GUI related chances are that you might be better served by a standard python module. For example there is a wx.FileConfig class in wxpython BUT IMHO you should use python's ConfigParser.
Classes in wxpython are like wx.DropSource but when you're looking for them in the wxDocs you should always remove the dot i.e. use wxDropSource.
Remember wxpython wraps only a part of wxwidgets BUT it also provides for classes of its own, most of them implemented in python so if you don't find the class in the wxDocs chances are that the class you're looking for is a custom made wxpython specific class. For such custom classes the best source of documentation is the code of the class itself. Search for it in the wxpython dir from site-packages and take a look at the code, a lot of this wxpython specific classes have docstrings that might help.
More about the wxDocs: C++GuideForwxPythoneers
When you're trying to use/learn a new class(widget) do the following:
- first look for it in the Demo application, chances are that you'll find a nice example of how that class could be used, that example should provide you with enough code to start your own piece.
- open the wxDocs and look for the class there, most of the time you'll find valuable information in the class description. For most of the widgets you'll find style bits that will show you how that class could be made to look and behave a certain way. You'll also find in the documentation the events fired by that widget so you'll know what to bind in order for you program to react the way you want it to.
The Demo has a PyShell available via F5 key (or via its menu). I find it very helpful to write the name of the class, press the dot key (.) and wait for the auto-completion to kick in. This way you'll be able to see all the available members of that class. Most of the time you'll find the same members shown in the wxDocs but some of the widgets have custom made python members (helper methods). Choosing a member in PyShell and pressing ( will bring up the docstring of that member... more info for you.
- Remember, you're using a object hierarchy, the class you're looking at might extend a certain parent class and some times... the functionality you're looking for is described in the documentation of the parent class. Explore! Learn what wx.Window provides as all widgets have it in hierarchy.
- If all of this fails... state your problem in the wxpython-users mailing list, you're bound to find some answers