[Pythonmac-SIG] embedded C in MacPython

Zhi Peng zhiyong_peng2003 at yahoo.com
Thu Oct 27 18:48:04 CEST 2005


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, they erased all *.py file and leave all *.pyc or *.pyd file. I even can not find include directory or headers directory on this new Mac. If MacPython is just same or similar to UNIX/LINUX python2.3, I should be confident on working on Mac. Maybe I need to download MacPython again and install them on the new Mac so that I could have all *.py file and head files. Actually all I need is "Python.h" file and python23.lib or python23.dylib currently. 
 
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 ? 
 
Thanks 
 
Zhi 


Chris Barker <Chris.Barker at noaa.gov> wrote:
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.

-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

		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20051027/964db8bb/attachment.html


More information about the Pythonmac-SIG mailing list