[Pythonmac-SIG] embedded C in MacPython

Chris Barker Chris.Barker at noaa.gov
Thu Oct 27 17:56:06 CEST 2005

Zhi Peng wrote:
> I has some small program in C which is compiled as .so library in
> Linux and I can directly import name_of_lib.so as a module from
> python when I run it on Linux. It looks same if I just see them from
> Terminal window on Mac. Did anyone compile any C code as library
> called by MacPython

Yes. If you use distutils to built it, it should "just work", at least 
on OS-X. What problems are you having?

> or from C code calling MacPython using
> Py_RunSimpleString or similar commands?  Thanks

I haven't done this, but I'm sure others have.

What version of "MacPython" are you using?

By the way, for the most part, Python is just Python on OS-X, it's 
hardly any different than Python on other *nix platforms, except it's 
packaged up in a Framework.


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

Chris.Barker at noaa.gov

More information about the Pythonmac-SIG mailing list