Differences between revisions 20 and 21
Revision 20 as of 2002-11-05 06:26:14
Size: 3546
Editor: anonymous
Comment: missing edit-log entry for this revision
Revision 21 as of 2003-01-28 19:54:10
Size: 3680
Editor: anonymous
Comment: missing edit-log entry for this revision
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
If you know no programming then this link is your bet: If you know no programming then this link is your best bet:
Line 79: Line 79:
Mention mailing lists
The wxPython-users mailing list is famous for it's helpful and friendly members. You can subscribe to it here: http://wxpython.org/maillist.php.

How to learn wxPython.

TableOfContents

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 best 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

The wxPython-users mailing list is famous for it's helpful and friendly members. You can subscribe to it here: http://wxpython.org/maillist.php.

And now a channel on irc.freenode.net has been started #python.

wxPython by Example (last edited 2012-06-28 08:10:48 by SWM-HIGH-SPEED2-22)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.