| Thanks for this.
I figured it out now. The python module has to be built as a bundle and it
has to be called *.so, although it looks like in later versions *.dylib is
also supported.
It also needs to be called _csnd.so as you say in your message, because
the symbol is init_csnd not initcsnd (the swig flag -interface seems to be
able to alter this).
Now I have to figure out the scons way of creating a bundle instead of
dynamic shared object.
Victor
At 16:46 25/10/2005, you wrote:
>I don't know much about OS X conventions. But, SWIG creates Python
>extension modules as follows:
>
>Python module name such as "csnd" becomes dynamic module such as "_csnd"
>(by convention, the Python module name is prefixed with "_" to become the
>shared library name).
>
>The dynamic module shared library exports a "C" function such as
>"init_csnd". When you "import csnd" in Python, the Python interpreter
>loads "_csnd.dll" or "_csnd.so" (or "_csnd.dylib" on OS X? What about
>forks?), and calls "init_csnd" which creates Python code to use the module.
>
>Hope this helps,
>Mike
>
>-----Original Message-----
>From: Victor Lazzarini
>Sent: Oct 25, 2005 10:42 AM
>To: csound-devel@lists.sourceforge.net
>Subject: [Cs-dev] python dynamic modules
>
>What is the right name for a python dynamic module? For instance,
>if I say
>
>import thisone
>
>the python interpreter will look for what?
>
>thisone.py?
>thisone.pyc?
>thisone.dylib or thisone.so or thisone.dll?
>
>Victor
>
>Victor Lazzarini
>Music Technology Laboratory
>Music Department
>National University of Ireland, Maynooth
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by the JBoss Inc.
>Get Certified Today * Register for a JBoss Training Course
>Free Certification Exam for All Training Attendees Through End of 2005
>Visit http://www.jboss.com/services/certification for more information
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by the JBoss Inc.
>Get Certified Today * Register for a JBoss Training Course
>Free Certification Exam for All Training Attendees Through End of 2005
>Visit http://www.jboss.com/services/certification for more information
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel
Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |