[Python-Dev] Loading compiled modules under MSYS/MingGW?

Steve Castellotti sc at eyemagnet.net
Sun May 15 09:56:24 CEST 2005


Hey all-

   Simple question. I'm working on getting Python support enabled for the Gimp
under Win32. I've set up and successfully compiled the Gimp under a MSYS/MinGW
enviroment, using both python.org Python 2.3 and ActivePython 2.3 (I need to
stick to 2.3 due to support issues with the packaging software I'm using)

   Both versions of Python give me the same problem when I try to load the
"gimpfu" module (used for accessing Gimp functions from within Python programs)


Sample Script:

import sys
sys.path.insert(1, '/local/lib/gimp/2.0/python/')
import gimpfu
print "cool"



Execution:

$ ./test
Traceback (most recent call last):
  File "./test", line 7, in ?
    import gimpfu
  File "E:\msys\1.0\local\lib\gimp\2.0\python\gimpfu.py", line 65, in ?
    import gimp
ImportError: No module named gimp



Directory listing:

$ ls /local/lib/gimp/2.0/python/
gimpenums.py  gimpmodule.a   gimpprocbrowsermodule.a   gimpui.py
gimpfu.py     gimpmodule.la  gimpprocbrowsermodule.la  pygimp-logo.png
gimpfu.pyc    gimpplugin.py  gimpshelf.py



   ...Python is finding gimpfu.py, but doesn't see "gimpmodule.[a,la]" .. this
directory listing is similar to what you would find under a linux compilation,
except linux also creates a "gimpmodule.so" library file.


    Am I missing something obvious? Is this a question better suited to
MinGW/MSYS mailing lists, or perhaps the Gimp list? If so, what's the right
kind of question(s) I need to be asking? It seems to me that the compile is
going through just fine, but somethings not getting built correctly and Python
can't see that module.


Cheers in advance,

Steve Castellotti



More information about the Python-Dev mailing list