Macintosh Python crash course


This set of documents provides an introduction to various aspects of Python programming on the Mac. It is assumed that the reader is already familiar with Python and, to some extent, with MacOS Toolbox programming. Other readers may find something interesting here too, your mileage may vary.

As the previous paragraph reveals to the careful observer these examples are dated, most of them were writting before OSX and haven't been updated afterwards. They still show how to use the Carbon wrappers but aren't necessarily the best way to use the Carbon API's in OSX.

Another set of Macintosh-savvy examples, more aimed at beginners, is maintained by Joseph Strout, at Python Tidbits in http://www.strout.net/python/.

The Python Library Reference contains a section on Macintosh-specific modules that you should also read. Documentation is also available in PostScript and other forms, see the documentation section on the webserver.

The W widget set by Just van Rossum, does not have complete documentation as of this writing, but Corran Webster has documented most of it on his Python Page.

There are also some documentation links, as well as other MacPython-related pages, in the Open Directory.

Table of contents

Note: Some of these documents were actually written a long time ago and have seen little maintainance, so use with care.
The Python distribution contains a few more examples, all unexplained: At some point in the (possibly distant) future, I will add chapters on how to use bgen to create modules completely automatic and how to make your Python program scriptable, but that will have to wait.


Please let me know if you miss critical information in this document. I am quite sure that I will never find the time to turn it into a complete MacPython programmers guide (which would probably be a 400-page book instead of 10 lousy html-files), but it should contain at least the information that is neither in the standard Python documentation nor in Inside Mac or other Mac programmers documentation.


Jack Jansen, jack@cwi.nl, 22-Apr-00.