Tree [f51dc9] legacy-trunk / Mac /

Read Only access

File Date Author Commit
 Build 2003-03-07 Jack Jansen Jack Jansen [dc9475] Got PythonStandalone to work again, mainly for ...
 Compat 2002-12-13 Jack Jansen Jack Jansen [342995] Compatibility files that haven't been used in a...
 Contrib 2003-01-08 Jack Jansen Jack Jansen [eb6b36] Merging the various tweaks for MacPython-OS9 2....
 Demo 2003-03-26 Jack Jansen Jack Jansen [ac721e] Modified to accept a command line argument too.
 Distributions 2003-04-29 Jack Jansen Jack Jansen [81d373] Added a note about Stefan Deibels list of conta...
 IDE scripts 2001-08-25 Jack Jansen Jack Jansen [42b2f1] Import the MacOS toolbox modules from the Carbo...
 Include 2003-02-21 Jack Jansen Jack Jansen [21a50c] Checking mac-specific stuff from the 2.3a2 bran...
 Lib 2003-03-21 Jack Jansen Jack Jansen [6fddcd] Getting rid of macfs.
 MPW 2002-06-14 Guido van Rossum Guido van Rossum [8e6760] SF patch 568629 by Oren Tirosh: types made call...
 Modules 2003-07-24 Jack Jansen Jack Jansen [aa44e0] Don't export the SPB type as "SPB", because it ...
 OSX 2003-07-23 Jack Jansen Jack Jansen [5ad439] Don't force boot-disk-only install, for reasons...
 OSXResources 2003-07-24 Jack Jansen Jack Jansen [673bce] Added instructions on setting the proxy host.
 Python 2003-07-23 Jack Jansen Jack Jansen [17ce12] MacPython-OS9 has its own copy of the interrupt...
 Resources 2003-01-08 Jack Jansen Jack Jansen [eb6b36] Merging the various tweaks for MacPython-OS9 2....
 Tools 2003-10-12 Just van Rossum Just van Rossum [0ddeca] fix for bug [819860]: make sure the buffer gets...
 Unsupported 2003-02-05 Jack Jansen Jack Jansen [f87b6d] I don't think this script serves a useful purpo...
 Wastemods 2001-12-09 Jack Jansen Jack Jansen [3a2cf5] Mods to make WASTE module compile and link for ...
 mwerks 2003-03-07 Jack Jansen Jack Jansen [dc9475] Got PythonStandalone to work again, mainly for ...
 scripts 2003-07-22 Jack Jansen Jack Jansen [e339ad] Various tweaks to make the packages work better...
 HISTORY 1997-05-28 Jack Jansen Jack Jansen [95d6e1] Changed release note structure:
 ReadMe 2003-06-16 Jack Jansen Jack Jansen [40c5f1] Added a note about FSRef tests failing on MacOS...
 ReadMe-dev 2000-10-22 Jack Jansen Jack Jansen [757ff8] Updated because developer option isn't distribu...
 ReadMe-src 1999-01-21 Jack Jansen Jack Jansen [6c1077] Updated for 1.5.2b1 (better late than never:-) 2003-02-21 Jack Jansen Jack Jansen [21a50c] Checking mac-specific stuff from the 2.3a2 bran...

Read Me

How to install MacPython-OS9 2.3a2 on your Macintosh

This is a MacPython that can run on Mac OS 8.6 with CarbonLib
installed, Mac OS 9 and Mac OS X. It is the direct successor of MacPython 2.2.

For Mac OS X users: you are probably better off with the normal unix distribution
of Python. That version also runs from the commandline, and if you do a framework
build it will contain all the functionality of this version too. A prebuilt
version will be available starting with the beta distributions.

If you are upgrading from a previous MacPython you should read :Misc:NEWS,
which lists the new features of this Python release. As of this release
the Mac-specific release notes have been moved to the "Mac" section of
the general NEWS file.

Two changes since 2.2 deserve special mention:
- Most Mac-specific modules have moved to :Lib:plat-mac. :Mac:Lib now contains
  only modules that are not shared with MacPython-OSX 2.3.
- macfs is now a pure Python wrapper module around various modules in the
  Carbon package. For 2.3a2 only this wrapping is incomplete: fsspec.SetDates()
  does not work yet. If you encounter any other problems please report them.


If this is your first encounter with Python: you definitely need the
common user documentation (common to all platforms). You can find this
(in various forms) on, and Through there, or via you can also find the most recent
MacPython distribution.

Mac-specific documentation is included in this distribution in folder
Mac:Demo. The documentation is sparse, but it will have to serve for
now. The documentation is in HTML format, start with index.html.

If you want a MacPython that runs on systems without Carbon support (8.1
up to 8.6 without CarbonLib) you should get MacPython 2.2.2.

If you want 68k support you will have get MacPython 1.5.2.

What to install

The optional parts in this distribution are
- PIL: the Python image manipulation package (allows you to read, write
  and display images and do lots of operations on them). Tkinter is no
  longer supported, a working Carbon version is Tk is not available.
- img: another imaging package. Has more file format support and is faster
  than imaging, but has only limited operations on images. There is a bridge
  between the packages.
- Numeric: the LLNL Numeric Python extension. All sorts of nifty operations
  on matrices and such. This is version 22.
- Developers kit: all header files and some tools and sample projects
  to get you started on writing Python extensions if you have CodeWarrior.
All these except the DevKit are installed with Easy Install.

After the installer finishes it automatically launches the
ConfigurePython applet, to finish configuration of your Python. 

Moving your Python installation after installing is generally not a
good idea.  If you have to do this anyway you should remove your
preference file, run ConfigurePython and remove all .pyc
files. (there's a script that does the latter).

If you don't have enough memory: the sizes choosen are somewhat
arbitrary, and they are as high as they are so that test.autotest runs
with fewer problems. An average Python program can make do with much
less memory.  Try lowering the application sizes in the finder "get
info" window, and seeing whether the resulting python is still usable.

After installing

It is probably a good idea to run the automatic tests. Start
Python and "import test.regrtest ; test.regrtest.main()".

On MacOS 8.6 a number of tests will fail because FSRefs are not

test_socket and test_logging fail, this problem is being investigated.

test_tarfile fails, this problem is being investigated.

Three tests will fail on MacOS9 with MemoryErrors:
test_longexp, test_sha and test_zlib (on MacOSX these should pass).

If you increase the PythonInterpreter memory partition size they will
pass (but for longexp you have to increase it by an incredible amount,
400MB is rumoured). It will, however, print some messages about
optional features not supported. You should not worry about these,
they are modules that are supported by Python on other
platforms. Also, if you didn't run compileall before autotesting you
may run out of memory the first time you run the tests. test_socket
may also fail if you have no internet connection. Please also read the
Relnotes file for other minor problems with this distribution.

Using Python is most easily done from the IDE, which has a builtin
editor, debugger and other goodies. The alternative is to use
PythonInterpreter, which is the lowlevel interpreter with a
console-window only (similar to Unix Python).

If your program uses Tkinter you MUST run it under PythonInterpreter,
Tkinter and IDE are incompatible and your program will fail in strange

OSX Multiple users note

Interaction with Mac OS X multiple users has been tested only very lightly.
If you install as a privileged user everything installs fine. 

If you install as a non-privileged user everything should install in your local
per-user folders. But: as there is no global PythonCore you can only run applets
if they reside in your toplevel Python folder.

If you install as a privileged user and then try to run
Python as another (non-privileged) user you may encounter a problem with
not having a preference file: the symptom is failing to import all sorts
of standard modules. If you remove your per-user Python preference files
(in ~/Library/Preferences) and then run PythonInterpreter once everything should
be fine.


Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter
shared library PythonCore lives in the Extensions
folder and the "Python 2.3a2 Preferences" file in the Python subfolder
in the Preferences folder. All the rest of Python lives in the folder
you installed in.

On OSX the library is installed in /Library/CFMSupport. The ConfigurePython
applets will complain if you have no right to create the libraries there
(you need Admin privileges). This has one consequence: you will not be able to
run applets unless they reside in the MacPython folder (such as the IDE or
EditPythonPrefs). If you try to run an applet stored elsewhere you will
get a "Cannot locate PythonCore" error message.

Things to see

Start off at Mac:Demo:index.html. Read at least the first few sections.

There is also a first stab at documentation (plus examples) in the
Mac:Demo folder. The toplevel Demo folder has machine-independent demos.

The ":Mac:scripts" folder has some sample scripts. Some are useful,
some are just interesting to look at to see how various things
work. The MkDistr, mkapplet and fullbuild scripts (plus the ones
mentioned above) may help you to understand how to use AppleEvents and
various other toolboxes from python.

Other mac-specific goodies can be found in :Mac:Tools, of which the
IDE sources and a CGI framework deserve special mention.

The 'img' group of modules, which handles I/O of many different image
formats is included, but without documentation.  You can find docs at (or somewhere around there).

Finally there is a Mac:Contrib folder which contains some contributed

Upgrading from older Python releases

Python releases are independent of each other, with separate
Preferences files, shared library names, etc. The good news is that
this means you can keep your older version around if you are unsure
whether to upgrade. The bad news is that your old preference settings
are lost and you have to set them again.

After you are satisfied that 2.3a2 works as expected you can trash
anything in the system folder that has "python" in the name and not

The ConfigurePython applet will try to detect incompatible
preferences files and offer to remove them. This means that re-running
ConfigurePython after a second install of the same MacPython version
(or after moving the Python folder) should fix things up correctly.

The installer

The installer for this product was created using Installer VISE
from MindVision Software. For more information on Installer VISE,
MindVision Software
7201 North 7th Street
Lincoln, NE 68521-8913
Voice: 402-477-3269
Fax: 402-477-1395

Just van Rossum <> created the initial version of the
installer (with Installer Vise Lite), and Jack worked from there.


As of Python 2.3 the MacPython thanks list has been merged into the
general acknowledgements, see :Misc:ACKS.

MacPython includes waste, a TextEdit replacement which is (c) 1998
Marco Piovanelli.

A special mention is deserved by Matthias Neeracher, who has written
the brilliant unix-compatible GUSI I/O library, without which
MacPython would not have sockets or select, and to Alexandre
Parenteau, who has ported this library to Carbon.


Send bug reports, suggestions, contributions and fanmail to
<>. However, a better way to discuss MacPython is to join the
<> mailing list, which is explicitly meant for
this purpose.

Jack Jansen
Kruislaan 413
1098 SJ Amsterdam
the Netherlands


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks