Embedding Python in a plugin

D

Daniel Holth

Hello! I am trying to embed Python into an xmms plugin using
Debian/unstable/i386, gcc 3.3.1 and Python 2.2.3+. The plugin is a shared
library loaded by xmms. The plugin is dynamically linked with the python
library.

Running scripts works but when I try to import python extensions I get these
kinds of errors:

Traceback (most recent call last):
File "<string>", line 1, in ?
File "/home/dholth/lib/python2.2/site-packages/xmmspy.py", line 12, in ?
import time
ImportError: /usr/lib/python2.2/lib-dynload/time.so: undefined symbol:
PyExc_IOError

I'm using all the compiler options I can find!

/bin/sh ./libtool --mode=link gcc -Wall -I/usr/include/xmms
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -g
-O2 -I/usr/include/python2.2 -I/usr/include/glib-1.2
-I/usr/include/python2.2 -g -O2 -I/usr/include/python2.2 -o libxmmspy.la
-rpath /usr/lib/xmms/General -module -avoid-version -Xlinker
-export-dynamic xmmspy.lo -lstdc++ -lpython2.2 -L/usr/lib -L/usr/X11R6/lib
-lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -lxmms

.... including "-Xlinker -export-dynamic" as suggested by distutils.

How do I embed Python in an application where the main application has no
knowledge of Python, only the dynamically loaded plugin does? Which
programs do this already?

Thanks a heap,

Daniel Holth
http://dingoskidneys.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top