Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Embedding Python in a plugin

Thread Tools

Embedding Python in a plugin

Daniel Holth
Posts: n/a
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

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/", line 12, in ?
import time
ImportError: /usr/lib/python2.2/lib-dynload/ undefined symbol:

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
-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
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
embedding python in a plugin Roger Edberg Python 0 07-18-2006 12:42 AM
tomcat-maven-plugin problem - mvn is looking for org.apache.maven.plugins:maven-tomcat-plugin Marcin Cenkier Java 1 04-12-2006 08:00 PM
Detect if Sun plugin is installed (in IE) EVEN if not set as default in plugin? PilotYid Java 1 10-31-2005 11:13 AM
Embedding Ruby as plugin Tobias Grimm Ruby 4 08-17-2004 04:38 PM
Embedding Ruby as a plugin (e.g. PhotoShop) Glenn Lewis Ruby 3 01-06-2004 04:49 AM