[Windows] Pygtk2 incompatible with Stackless

Lorenzo Gatti gatti at dsdata.it
Mon Mar 29 08:02:59 EST 2004


Last weekend I tried to install Pygtk2 on Windows. I succeeded
(maybe), but I discovered a likely bug.
I have Windows 2000, Python 2.3.3 (with ActivePython installed after
the normal version) and a recent Stackless 3.0 python23.dll.
I think I've chosen correct and matching versions of GTK2 (Dropline
distribution 2.2.4-2) and Pygtk2 (pygtk 2.2.0-1.win32-py2.3.exe).
I installed both in the default locations (pygtk in site-packages,
GTK2 in c:\programmi\file comuni\gtk).
Then I added c:\programmi\file comuni\gtk\lib to the PATH to load GTK2
libraries, I added %PATH% to the PYTHONPATH environment variable
(previously empty) to load the GTK libraries from Python too, and with
advice from Microsoft Dependency Walker I rearranged PATH because a
mismatched iconv.dll from ActiveTcl was loaded instead of the GTK2
one.
I had an unrelated installation problem: the pygtk initialization code
looks for directory names like "gtk-2.0" and there is one such
directory in the GTK installation. This directory is assumed to be the
pygtk installation subdirectory for GTK 2.0. Instead of hacking pygtk
I copied the files there.

After all this entertainment I could import the whole family of
modules and call pygtk.require("2.0") without errors, but I had a
surprise:

C:\>python
Python 2.3.3 Stackless 3.0 040324 (#51, Mar 24 2004, 18:07:02) [MSC
v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> gtk.Window()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
RuntimeError: more keyword list entries than argument specifiers
>>>

This cryptic message comes from getargs.c and appears to be an
incorrect specification of some function in Pygtk, but it isn't.
Reverting to the normal python23.dll the result appears correct:

C:\>python
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> gtk.Window()

(:540): Gtk-WARNING **: Impossibile trovare il gestore dei temi in
module_path: "wimp",
<gtk.Window object (GtkWindow) at 0x7ef030>
>>>

The only configuration difference between the two transcripts is a
replaced c:\winnt\system32\python23.dll.

Like most users, I have little need to use Stackless Python and Pygtk
at the same time, but this issue can be worth investigating for the
Stackless and/or Pygtk2 developers.

Lorenzo Gatti



More information about the Python-list mailing list