OpenRPG Plugin HQ

Contact me: aim | icq | yahoo im | e-mail (remove SPAMISBAD)

//pyguide/The Tools of Programming Python for OpenRPG

You are viewing Chapter 0.2: The Tools of Programming Python for OpenRPG of the Guide to Learning Python for OpenRPG. You can also go to the table of contents to see the full list of available chapters.

When programming Python and wxPython, you can use any text editor that saves its files as plain text (that means you can use Windows Notepad but MS Word might cause problems), but in Windows (and, I think, some other platforms) there is a very useful program called "IDLE" which makes coding a little easier. There are several features of IDLE which make it invaluable to Python programmers. For one, it has syntax highlighting, so something that looked like just plain text now jumps out to you as code, with different parts of it different colors, so that you can easily see which things are in quotes, which things mark the beginning of certain sections of your code, which things are commented, etc. Second, it has some handy tools - like "comment out selected area" or "indent selected area" . These things, if you learn to use them, can save you a huge amount of time and trouble. IDLE also uses Python's interpreter, so you can test your programs without even leaving the program - though if they crash it, they crash the editor too.

wxPython comes with two invaluable tools of its own. The first is the wxPython demo, which is a wonderful introduction to many of the features and functions of wxPython - it has demos for numerous wxPython widgets and controls, which are incredibly useful in making a wxPython program. Each demo comes with source code, which explains how the demo was made. It takes a bit of experience figuring out how to take their source code and turn it into something you can use in your program, but once you can do that, it becomes a very handy tool.

The second tool from wxPython is the wxWidgets (formerly known as wxWindows) reference - a help file which lists pretty much every widget (called a control) from wxWindows (from which wxPython is derived), so if you're ever wondering what a text box can do, or what the exact phrasing for getting the value of a checkbox, or anything like that, this is the right place to look. Just open it up, and in the tree on the left open the Alphabetical Class Reference - then just find the particular control you're looking for.

Now, you should be prepared to start coding, so I shall delay no longer!

The OpenRPG Plugin HQ by mDuo13
OpenRPG Webring Image [ Prev | Skip Prev | Prev 5 | List | Stats
Join | Rand | Next 5 | Skip Next | Next ]