[Tutor] PyGTK: is there a library for both Linux and Windows

Chris Fuller cfuller084 at thinkingplanet.net
Wed Oct 21 16:29:39 CEST 2009


The version of GTK for windows I like to use is at 
http://gladewin32.sourceforge.net/, but it is rather out of date.  It's main 
advantage is everything is bundled up in a nice installer.  You can also get 
it from the main site at ftp://ftp.gtk.org/pub/gtk, but you have to grab 
several files and install manually.  I've never tried to figure out which 
ones, but I expect it wouldn't be hard.  You could check the dependencies of 
the PyGTK shared objects,  i.e. with http://www.dependencywalker.com/

You could also just get a more current, but still bundled up runtime from 
Pidgin (http://www.pidgin.im/), and install glade separately, as its only a 
single file.

Note that you'll need to get PyGTK from the gnome site 
http://ftp.gnome.org/pub/gnome/binaries/win32/.  Get PyGTK, PyObject, and 
PyCairo.

Yes, glade is awesome.  You'll need to learn how to hook the signals into your 
code.  There are a lot of tutorials out there, but the ones I used are at the 
Linux Journal site:
http://www.linuxjournal.com/article/6586
http://www.linuxjournal.com/article/7421
http://www.linuxjournal.com/article/4702

There's a bit of a caveat.  You will find in most cases that the system Python 
and GTK (or numpy, PIL, etc) that your distribution provides is lagging 
somewhat behind what you can easily install on a Windows box, since there's 
aren't so many interdependencies.  I'm just now starting to playing around 
with ArchLinux to see if I can get aruond this.

Cheers

On Wednesday 21 October 2009 08:42, Nicola De Quattro wrote:
> Hi
> I'm starting to design some windows for my little tool.
> I've two questions for you:
> 1) In this page http://www.pygtk.org/downloads.html there are two
> different library for Windows and GNU/Linux, but I want my application
> to be executed identically under Windows and under GNU/Linux. Is PyGTK
> a good choice? There are some difference between PyGTK library under
> Windows and under GNU/Linux, that is have I to develop two different
> versions of my tool?
> 2) Do you suggest to use Glade to design windows? Note: I'm totally
> new both to python and to GUI design (I've always worked on signal
> processing, never develop a MMI) so I'm searching something that can
> be as much as possible both "educational" and friendly.
>
> Thank you for your help


More information about the Tutor mailing list