By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,547 Members | 1,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,547 IT Pros & Developers. It's quick & easy.

[Windows] Pygtk2 incompatible with Stackless

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Lorenzo Gatti wrote:
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.


Thanks for pointing us to that problem. It is of course relevant
since Stackless tries to be a complete replacement for Python.
In a slightly too rigorous implementation of thread pickling,
I renamed some builtin types slightly, which caused other
problems, already. These changes will be gradually undone.
I very much hope that the Pygk2 problem belongs to this simple
class.

thanks - chris

--
Christian Tismer :^) <mailto:ti****@stackless.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 mobile +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.