Derrick Snowden wrote:
someone might have a pointer for a gentle intro to
Python on the Mac. If there is a good place to get some background I might be able to avoid the standard newbie questions. For example I dutifully installed Fink and have been using it to install some Python packages. However I notice that the Python installation from fink seems to be different than Python that comes with OSX Panther (/Library/Python I think). I always hated having two versions of Python on windows (the windows native port and the cygwin python) but I saw no way around it. Should I anticipate having two python installations on the mac as well?
I think you've got the right impression, also reinforced by Jeff:
fink (and/or darwinports) is a lot like cygwin on Windows: A parallel unix-like system. I think Jeff has laid out very well why you'd want to use it: If you want a system that is pretty much like you'd get with other unixes. However, what this means is that it really is kind of distinct from the rest of OS-X, fink stuff works with fink stuff, and OS-X stuff works with OS-X stuff. My feeling is that it's easiest if, for a given purpose (say, python development), you go either all fink or no fink, and not try to mix them.
I'm going to give my opinion here as to what you should do:
If you want a system that is much like what you're used to with Linux (and cygwin), then go all-fink.
If you want to have your python work more integrated with OS-X (this is the approach I'm taking), then stick with the non-fink Python options:
1) subscribe to the python-mac mailing list:
2) Choose a version of Python. I'm assuming you have Tiger. It comes with python 3.2. You can use that, but I think more folks now are using Bob Ippolito's "official unofficial" 2.4.1 build:
(also install the TigerPython24Fix)
3) Get any packages you can from:
If you can't get a package there, then you can usually it yourself. SciPy is a challenge in this regard, but most stuff is not too tough. I've contributed a build of matplotlib 0.82. In that package, I described how I did it, so if you want a newer version, you can build it yourself. If you do, please contribute it back to that repository, by posting to the pythonmac list.
Install Py2App, and then use bdist_mpkg to build mac packages of any extension you build, and then contibute them to pythonmac.org
As you are using other systems, I'd recomend wxPython (from pythonmac.org, or the wxPython site). It's not quite as maintained as PyGTK for matplotlib, but it works fine, and it's really the best option for cross platform development. For just the Mac, someone was working on a Cocoa back-end for matplotlib, you might want to look out for that.
Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception