Questions tagged [pygtk]

PyGTK is the Python binding for the GTK+ widget library.

PyGTK lets you easily create programs with a graphical user interface using the Python programming language and the GTK+ library. GTK+ provides all kinds of visual elements and utilities, and is the official toolkit of the GNOME Desktop.

PyGTK applications are multiplatform and able to run, unmodified, on Linux, Windows, MacOS X and other platforms.

For more information, see the Wikipedia page of PyGTK.

2238 questions
8
votes
2 answers

Installation of pygtk not working

I am running on Windows (64bit version) and have python 2.7 (also 64 bit) installed. I downloaded the all-in-one installer for pygtk for python 2.7, but when I run it, it shows "python 2.7 could not be located on your system". Why is it so when I…
user672546
  • 101
  • 1
  • 3
8
votes
1 answer

How to install GTK+/PyGTK on OSX?

I'm trying to install PyGTK on OSX 10.6 (snow leopard). I have followed this topic Where is PyGTK for Mac OS X?. When I run the last command : ~/.local/bin/jhbuild build meta-gtk-osx-python I have the following error : *** Checking out gtk+ ***…
Sandro Munda
  • 39,921
  • 24
  • 98
  • 123
8
votes
3 answers

PyGTK Entry widget in TreeViewColumn header

How can I make a gtk.Entry widget focusable or editable within a gtk.TreeViewColumn header/title? I've tried this: # Create tree-view. treeview = gtk.TreeView() #... # Create column. renderer = gtk.CellRendererText() column =…
Uyghur Lives Matter
  • 18,820
  • 42
  • 108
  • 144
8
votes
2 answers

How to remove an item from a gtkMenu?

I have created a gtkMenu using gtk.Menu(), appended a couple of items and now I want to remove some menu items. How can I do that?
Ingo
  • 1,732
  • 10
  • 26
  • 34
8
votes
2 answers

Python + webkit + gtk on windows

I am trying to do this script: PY WYSIWYG And it says I need Gtk and WebKit. I think this is what I need: Gtk WebKit So I downloaded WebKit but I got a folder instead of an installer or install information. Do I move it into the python folder or…
DonJuma
  • 2,028
  • 13
  • 42
  • 70
8
votes
1 answer

_really_ disable GtkTreeView searching

How do I really disable gtk treeview interactive search? The docs say to set_enable_search(False), but if I do this, CTRL+F still causes an annoying search pop-up to appear. Connecting to start-interactive-search and returning True doesn't work…
Claudiu
  • 224,032
  • 165
  • 485
  • 680
8
votes
3 answers

How do you draw a grid and rectangles in Python?

What Python-related code (PyGTK, Glade, Tkinter, PyQT, wxPython, Cairo, ...) could you easily use to create a GUI to do some or all of the following? Part of the GUI has an immovable square grid. The user can press a button to create a resizable…
Winston C. Yang
  • 1,497
  • 2
  • 18
  • 27
8
votes
6 answers

import gtk/glib produces ImportError: DLL load failed

I installed the latest versions of python (2.6.5), gtk+, pygtk (and friends) from their respective websites on Windows XP SP3. When you try to import gtk (or just glib for that matter), an ImportError is raised: Python 2.6.5 (r265:79096, Mar 19…
Jon
  • 9,815
  • 9
  • 46
  • 67
8
votes
2 answers

Detect user logout / shutdown in Python / GTK under Linux - SIGTERM/HUP not received

OK this is presumably a hard one, I've got an pyGTK application that has random crashes due to X Window errors that I can't catch/control. So I created a wrapper that restarts the app as soon as it detects a crash, now comes the problem, when the…
Ivo Wetzel
  • 46,459
  • 16
  • 98
  • 112
8
votes
2 answers

catch close gtk.window

I have gtk.Window and I need to catch closure. I need to close the show the message dialog and click Yes if the window should be closed unless there is a show window Thank you.
0xAX
  • 20,957
  • 26
  • 117
  • 206
8
votes
6 answers

How do I coherently organize modules for a PyGTK desktop application?

I am working on a desktop application in PyGTK and seem to be bumping up against some limitations of my file organization. Thus far I've structured my project this way: application.py - holds the primary application class (most functional…
bouvard
  • 3,864
  • 25
  • 29
8
votes
4 answers

GUI not updated from another thread when using PyGtk

I am using PyGTK to build a GUI application. I want to update the textview widget from another thread but the widget is not getting updated everytime i try an update. What should i do to get a reliable GUI updating?
appusajeev
  • 2,129
  • 3
  • 22
  • 20
8
votes
1 answer

"WindowsError: [Error 2] The system cannot find the file specified" is not resolving

I have created exe file of my python project by py2exe which have number of files. when i run this exe file in my system. it works fine but if i put it in another system then it opens login form, then after it doesn't go to next window which i have…
Ashish Jain
  • 760
  • 1
  • 8
  • 23
8
votes
2 answers

How can i import gtk.gdk from gi.repository

I have this python code that takes screenshot of x screen. #!/usr/bin/python import gtk.gdk w = gtk.gdk.get_default_root_window() sz = w.get_size() print "The size of the window is %d x %d" % sz pb =…
mnrl
  • 1,635
  • 2
  • 17
  • 28
8
votes
3 answers

Write custom widget with GTK3

I am trying to find the simplest example of a custom widget being written for Gtk-3. So far the best thing I've found is this (using PyGTK), but it seems to be targeted to Gtk-2. BTW: I don't care the language it is written in, but if we can avoid…
knocte
  • 16,941
  • 11
  • 79
  • 125