Requirements

PythonCard requires Python 2.1.x and wxPython 2.3.x. The latest PythonCardPrototype package is available at Sourceforge.

Some of the samples require additional components such as mySQL and ZODB. If a sample requires any extra libraries or packages, then that is discussed in the readme.txt file for that particular sample.

Installation

Windows

Unzip the downloaded file. Move the PyCrust and PythonCardPrototype directories to your python21 directory. On Windows the directory is probably called 'C:\Python21'. Alternatively, you can put the PyCrust and PythonCardPrototype directories in any directory that is on your PYTHONPATH.

Unix

Unzip the downloaded file. If you're on a Unix system, use the -a option to convert the line endings of the text files. Move the PyCrust and PythonCardPrototype directories to <prefix>/lib/python2.1/site-packages/ where <prefix> defaults to /usr/local (but may be /usr/bin when Python came as part of your Unix distribution)

Post-installation

You can move the 'samples' directory inside the PythonCardPrototype directory to a more convenient location on your hard drive if you wish.

Running your first sample

All you have to do is double-click one of the .py files in one of the sample directories like 'samples\minimal\minimal.py'. You can also run the files from the command-line, and the command-line is probably preferred if you want to invoke one of the debug windows (see below) with the program. The one thing you should not do is run a sample from within PythonWin or IDLE since neither of those IDEs launches an app in a separate process, so you'll run into GUI contention issues. You can launch from an IDE like Komodo. What I typically do is edit in PythonWin and keep a shell window (DOS prompt) open to run the program once I make an edit change; alternatively keep a shortcut to the program or an Explorer window open to the directory the program is in so you can double-click it. You can change the .py extension to .pyw on any of the samples if you want to get rid of the console window that pops up when you run the program.

Valid command-line options

Valid command-line options are: -l (enable Logging), -m (Message Watcher), -p (Property Editor), -s (Shell) and -n (Namespace Viewer). Invoking any of those options will actually give you all of them but only the one requested will be shown initially. You can hide/show any of the windows via the Debug menu if you used a command-line option to start an app.

pythoncard_user_config.py

You can set the default position and size of each window and whether it appears by choosing "Save Configuration" from the Debug menu when you start a PythonCard app using any of command-line options. $Revision: 1.6 $, documentation updated on $Date: 2002/02/07 23:48:27 $ SourceForge Logo