[PyKDE] New PyKDE Release (alpha6) and Killing PyKDE 3.8

Simon Edwards simon at simonzone.com
Tue Apr 27 18:51:01 BST 2004


On Tuesday 27 April 2004 13:38, David Boddie wrote:
> On Tuesday 27 April 2004 08:22, Simon Edwards wrote:
> > Anyway, answer lies on the dlopen() man page:
> >
> >     Optionally, RTLD_GLOBAL may be or'ed with flag,  in  which  case
> >     the  external  symbols defined in the library will be made available 
to
> >     subsequently loaded libraries.
> I'm ahead of you here. ;-) The custom version of libpythonize I was using
> with PyKDE 3.8 did this to allow me to do things like embedding a console in
> Konqueror. I thought I sent you and Jim my changes...

nope, send it on. :) So you have a dlopen() two-stage stub thingy already?

> > Now, why does David's workaround actually work? When you link the kcontrol

> Thanks for the explanation. It's interesting to hear how it works;
> particularly the parts describing when things are actually loaded.

I read some docs and some info about ELF, played with objdump a bit and 
fiddled with it until I worked out what the difference was between a stub 
linked against time.so and one that is not.

> > For bonus points: Is it possible to make a kcontrol module stub that loads
> > libpythonize and libpython using dlopen(), but with the RTLD_GLOBAL flag
> > set so that dlopen() in the python interpreter will work as expected? I
> > guess I'll have to try that out... :-)
> 
> You just link in libpythonize at compile time, don't you?

linked as a normal shared library.

> > (BTW, linking with -export-dynamic -Wl,-E doesn't seem to have much 
effect)
> I'll tidy up what I have and send it to you. Maybe I'll get around to 
hacking
> on it again this weekend.

cool,

-- 
Simon Edwards             | Guarddog Firewall
simon at simonzone.com       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."




More information about the PyQt mailing list