Wednesday, September 25, 2002 | |
Painless Python on OS X I was extremely happy to see that Python was shipped with OS X 10.2. And it is a recent version, at that. Nice! Unfortunately, Apple could not ship the readline module with Python because that particular module is based on GPL'd code. Of course, code under the GPL isn't actually free and, as such, the entire core operating system cannot contain any non-free or non-Apple owned code. The dev tools-- an add on module on top OS X-- can and does include lots of binaries compiled from GPL'd code. Conveniently, it also includes the readline library. So, one short setup.py later, I now have readline support for OS X. You can to. Just download this little tarball (5.5k). Once uncompressed, go into the resulting folder in Terminal and sudo /usr/bin/python setup.py install. You'll now have readline support when using the python interpreter at the command line! Requires the OS X 10.2 and the July developer tools.
Update: Requires the August developer tools patch (as that includes the Readline headers and a new build of the framework). |