On Fri, 9 Mar 2001, Danie Roux wrote:

> I had a lot of problems in Debian with the imlib library not wanting to display my 
>theme or any other image I wanted.
> 
> Loading this dummy module before anything else solves the problem:
> 
[snip]
> 
> But I have to call dlclose for every library I open right? So where do I do
> that? Is there  some way in Python that I can ensure a piece of code is run,
> even when the interpreter exits unexpectedly?

If you want the library to stay open for the duration of the python
session (which it will if you import GdkImlib), then don't worry about
dlclosing it.

> 
> btw, I can't tell you what a relieve it is to finally run my program on a stock
> Debian system. 
> 
> And for those that haven't followed it all, Debian is not to blame.

There are reasons why this is not implemented in pygtk directly.  First of
all, there is no guarantee that libgdk_imlib.so will be the correct soname
for the library (on systems that don't have the devel portion of imlib
installed, they may only have libgdk_imlib.so.1).  On HP-UX machines, it
would be called libgdk_imlib.sl.  If there was a newer incompatible imlib
and libgdk_imlib.so pointed to it, while the python binding was built
against the old one, then this may cause problems.

By all means, use this code to get your app working, but note that it
isn't portable :)  As I said before, the correct fix is to use the new
libtool to build imlib when it is released, so the shared library
dependencies can be corrected.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to