[Pythonmac-SIG] embedded C in MacPython

Chris Barker Chris.Barker at noaa.gov
Thu Oct 27 19:14:48 CEST 2005


Zhi Peng wrote:
> Hi! Chris Thanks a lot for your email. It is exactly what I would
> like to have. I use MacPython 2.3. But unfortunately, on my Mac 10.4
> Tiger,

Are you using the 2.3 that Apple provided? If so, I think the headers 
you need are there, but I don't have Tiger. If they are not there, it 
may be that you'll get them as part of Apple's developer tools package.

 > If MacPython is just same or similar to UNIX/LINUX python2.3, I
> should be confident on working on Mac.

There are a few odd difference, mostly with where libs are named and put 
and the like, but it's a pretty easy transition, particularly if you're 
not doing any GUI stuff.

 > Maybe I need to download
> MacPython again and install them on the new Mac

If you want to upgrade, I'd install Bob Ippolito's "Official Unofficial" 
2.4.1:

http://undefined.org/python/#pimp

You'll probably also want the TigerPython24Fix

If you need any additional packages, look here first:

http://pythonmac.org/packages/

> On *nix system, it normally is with C compiler such as gcc cc or
> workshop. What is the most often used c compiler on Mac ?

gcc. Used by Apple and most other people. To get it you need to install 
the development tools, known as "XCode tools" or something like that. 
XCode is Apple's IDE, but they distribute command line gcc with it, all 
as one massive package. You may have it on a cd that came with your copy 
of OS-X, or you can download it for free from the Apple developers 
website. You do need to register and receive their spam, but they don't 
charge for it.

One other note. The system compiler for OS-X 10.4 is gcc 4.*, which is a 
bit more picky about standards compliance than gcc3.*, so some code 
won't compile with it. I think Xcode tools comes with both, however, and 
there is a script for switching between them, if you need to use the 
older version, the name of which evades me at the moment.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer
                                     		
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

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list