The instructions below are for installing PythonCard on Mac OS 10.4 (Tiger). If you are using Mac OS 10.3 (Panther), then please use these instructions instead or these instructions if you're using Mac OS 10.2 (Jaguar).
Installing PythonCard on your system requires the following steps:
- Download Python from the python.org site.
- Download wxPython from the wxPython.org site.
- Download PythonCard from the PythonCard site.
- Install MacPython add-ons
- Install wxPython
- Install PythonCard
- Confirm the installation works
If you're running Tiger then you already have Python 2.3.5 installed on your system, but we want a more up-to-date build of Python.
Click on this python-2.5.1-macosx.dmg link to begin the download. Most Mac OS X browsers will save the file to your desktop.
PythonCard relies on the wxPython package. Click on this wxPython2.8-osx-unicode-184.108.40.206-universal10.4-py2.5.dmg link to begin the download. Again, most Mac OS X browsers will save the file to your desktop.
The latest version of PythonCard is always available via the PythonCard download page. Click on this PythonCard-0.8.2.tar.gz link to begin the download. Again, most Mac OS X browsers will save the file to your desktop.
Python arrives at your system as an installable disk image. All you have to do is double-click on the file you downloaded (it's called python-2.5.1-macosx.dmg), then double-click the MacPython.mpkg icon and follow the instructions in the installation wizard. The installer will create a new directory /Library/Frameworks/Python.framework/Versions/2.5/ to contain the Python executables, documentation, tools, and standard libraries. It will also create a folder in your Applications folder called MacPython 2.5 which contains the IDLE editor, Python Launcher, and a large number of demos.
wxPython also comes as an installable disk image. Just double-click on the file you downloaded (it's called wxPython2.8-osx-unicode-220.127.116.11-universal10.4-py2.5.dmg), then double-click the wxPython2.8-osx-unicode-universal10.4-py2.5.pkg icon and follow the instructions. wxPython will be installed into /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/.
You should also download the Docs, Demos, and Samples for wxPython. Click on this wxPython2.8-osx-docs-demos-18.104.22.168-universal10.4-py2.5.dmg link to begin the download.
I recommend creating a wxPython folder in your Applications folder and copying the Apps, Docs, Samples, and README 1st.txt files to the wxPython folder once you've opened the disk image.
The PythonCard-0.8.2.tar.gz file you downloaded should automatically be decompressed by Stuffit; if the file isn't already decompressed, then double-click the PythonCard-0.8.2.tar.gz file. You should now have a PythonCard-0.8.2 directory on your desktop. Open the Terminal application and do a cd to that directory and then run the setup.py script using the 2.5.1 Python you just installed. The sudo command will prompt you for your password.
[mymachine:~] bob% cd ~/Desktop/PythonCard-0.8.2
[mymachine:~/Desktop/PythonCard-0.8.2] bob% sudo python setup.py install
By default, the PythonCard framework will be installed into /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/. You'll probably want to make an alias to this directory to keep on your desktop or home folder to make it easier to get to the PythonCard tools and samples.
Configuring Python Launcher
The default install leaves .py and .pyw files associated with the Python IDE rather than Python Launcher which is the app used to run Python scripts from the Finder. Python Launcher is located in your Applications/MacPython 2.5 folder
If you select a .py file you can choose Get Info from the File menu and then change the files to open with Python Launcher instead of the IDE if you want to be able to double-click a file and have it run. Repeat the process for .pyw files. Alternatively, you can hold down the control key and when you click on a .py file then you can select Python Launcher from the Open With menu item.
Figure 1. Python Launcher Preferences
OK, now comes the acid test. Open the folder called "minimal" in /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/samples. Find the icon labeled minimal.py and double-click it. In a few moments (after an operating system console window has appeared), a small window like the one shown in Figure 2 will appear. This indicates that your installation was successful and everything is working. Close the minimal application in the usual way and proceed with the Walk-Through.
Figure 2. PythonCard minimal application window open to confirm installation is correct
If for some reason this test fails, go back over these instructions carefully. In particular, make sure that wxPython and PythonCard both appear in the site-packages folder in Python's Lib folder.
If everything seems OK and you still can't get minimal.py to launch, post a message to the PythonCard Users Mailing List. (If you aren't yet a member, visit the list management page and join.)
$Revision: 1.5 $ : $Author: kasplat $ : Last updated $Date: 2007/07/29 02:31:46 $