Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Embedding Python in a plugin (http://www.velocityreviews.com/forums/t319675-embedding-python-in-a-plugin.html)

Daniel Holth 07-14-2003 10:22 PM

Embedding Python in a plugin
 
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/


All times are GMT. The time now is 01:19 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.