Size: 3551
Comment: missing edit-log entry for this revision
|
Size: 3546
Comment: missing edit-log entry for this revision
|
Deletions are marked like this. | Additions are marked like this. |
Line 78: | Line 78: |
== Real Life Help == | == Live Help == |
How to learn wxPython.
We have had a lot of questions on the newsgroup asking how to go about learning wxPython. This page gives some pointers on how to do just that.
First of all, if you are new to Python, and especially if you are new to programming in general, it makes the most sense to learn Python itself first, without any GUI stuff. This can be frustrating if your goal is to write GUI programs, and particularly if you have experience with an environment like Visual Basic in which GUI programming is integrated into the environment. It is worth it, however, to take some time to learn about Python. Python is a very powerful language capable of doing many things both with and without GUIs.
Using wxPython requires a pretty good understanding of Object Oriented (OO) programming in Python, and all of the tutorials and references that I will refer to later assume this knowledge.
Learn Python
If you know no programming then this link is your bet:
http://www.python.org/doc/Newbies.html
If you are already familiar with programming but still need to learn Python, then the Python Tutorial is a good place to start:
http://www.python.org/doc/current/tut/tut.html
Learn wxPython
Once you have a fundamental understanding of programming in Python, you can start to learn wxPython for GUI programming.I would suggest starting with the Tutorial. It is brief , and not complete, but it is a good start. You can find it here:
http://wxpython.org/tutorial.php
The wxPython wiki ["Getting Started"] section is more thorough overview.
Between these two, you should have a basic grasp of how wxPython works, and be ready to make your own application. To do this, you will want two things: examples and a reference.
The Comprehensive Demo Files
The wxPython demo is your best source of examples. It is distributed with wxPython, and demonstrates virtually all the features of wxPython. When you run it, you can see how different features work, and see the source code that made it happen. Many of us look for something in the demo that is close to what we want to do, copy it, and then alter it to fit our needs.
If you can't find it in your installation: Here are the most recent versions: http://telia.dl.sourceforge.net/sourceforge/wxpython/wxPythonDemo-2.3.3.1.tar.gz http://telia.dl.sourceforge.net/sourceforge/wxpython/wxPython-demo-2.2.5.tar.gz
Another source of examples is the ["wxPython Cookbook"].
The API
The reference manual for wxPython is the same as the reference for the C++ version of wxWindows, and can be found here:
http://www.wxpython.org/onlinedocs.php
It is written in C++ syntax, with notes inserted when the Python implementation differs from the C++. The fact that the docs are written for C++ is unfortunate, not because they aren't useful to Python programmers, but because is can be very intimidating to new users who don't know C++. In fact, many Python programmers who don't know a bit of C++ find that the docs can be very useful. It only takes a little while to learn to translate from the C++ in the docs to the equivalent Python. One of the best ways to learn to do this is to compare code from the examples in the wxPython demo to what is in the reference manual. There is also the ["C++GuideForwxPythoneers"] page on this site to help you further.
Live Help
Mention mailing lists
And now a channel on irc.freenode.net has been started #python.