<DIV id=RTEContent>  <DIV>If part of all code can be compiled as .so library on Mac and also be imported by python, it will be ideal case. As I tried swig utility, it seems it does not work well on Mac. It does not show the error message. I do not know the reason. The compile and ld linker seems fine. I would like to have&nbsp;a small C code and then compile and linked as dynamic library so that it can be imported by python code as we had in Linux platform. I have not tried it completely. except by swig. </DIV>  <DIV>&nbsp;</DIV>  <DIV>Mac terminal looks like unix/linux, but there are some difference, which I may not know enough. In C code, all argumnet, parameters have to be changed to in PyObject form, otherwise, python code may not be able to call the function. Not sure if anyone trys swig utility on other platform? on swig home page, there is an example, it might work on linux/unix. But it does not work well on Mac as I tried it. </DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks for all
 info and help. </DIV>  <DIV>&nbsp;</DIV>  <DIV>Zhi<BR><BR><B><I>Bob Ippolito &lt;bob@redivi.com&gt;</I></B> wrote:</DIV><BR><BR><B><I>Bob Ippolito &lt;bob@redivi.com&gt;</I></B> wrote:  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>On Dec 13, 2005, at 4:45 PM, Zhi Peng wrote:<BR><BR>&gt; See if I go the right direction.<BR>&gt;<BR>&gt; On Wed, I will use my old code to build .so file which is run on <BR>&gt; Linux. See what happen.<BR>&gt;<BR>&gt; I used swig and get name.so file and get rid of error message. When <BR>&gt; I start python or pythonw and import name<BR>&gt; from command line, it just hang there. It is interesting (not show <BR>&gt; any error). I would rather write a little more code on this part. <BR>&gt; On Linux, it generate name.so, is it same name style on MAc ? any <BR>&gt; difference? Thanks Bob and others.<BR>&gt;<BR><BR>Use distutils, it knows how to build extensions on all platforms. If <BR>you're not
 using distutils, then you'll almost certainly do something <BR>incorrectly. Distutils knows better than you which compiler and <BR>linker options to use for linking extensions.<BR><BR>Yes, the naming convention for Python extensions on Linux and Mac OS <BR>X happens to be the same. The actual extension binaries are going to <BR>be very different and totally incompatible though.<BR><BR>-bob<BR><BR></BLOCKQUOTE><BR></DIV><p>
        
                <hr size=1>Yahoo! Shopping<br> 
Find Great Deals on Holiday Gifts at <a href="http://us.rd.yahoo.com/mail_us/footer/shopping/*http://shopping.yahoo.com/;_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1 
">Yahoo! Shopping</a>