[pygtk] stricter versioning in scripts

David I. Lehn dlehn@vt.edu
Fri, 4 Oct 2002 16:00:57 -0400


I've had a slight problem with pygtk1 vs pygtk2 recently.  The Debian
packages are setup such that pygtk.pth defaults to pygtk1.  Even when
only pygtk2 is installed the maintainer still won't setup pygtk.pth to
use pygtk2 [1].  This breaks all pygtk2 scripts including all the
examples.  The only way to use pygtk2 scripts on Debian machines for now
is to use the code:

 import pygtk; pygtk.require('2.0')

Perhaps to solve such problems and future-proof scripts it might be a
good idea to require that pygtk.require(...) is called in scripts from
now on.  If not specified the gobject/gtk import could annoy/warn the

Good or bad idea?

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=163253