change gtk.Paned handle size

gtk.Paned contains a style property called 'handle-size' which i assume will change the size of the handle, it's read only, so how do i change it?(in PyGtk)

Enable or disable gtk.Button in PyGTK

How can I set a gtk.Button enabled or disabled in PyGTK?

Dump X clipboard data with GTK+ or PyGTK

How do I paste HTML data from the X clipboard using PyGTK/GTK+? I would need something like xclip, but with the ability to output clipboard data as HTML, not just as plain text. I'm using PyGTK,...

GtkTreeView insert/update performance penalty because of sorting

I'm having performance problems when inserting many rows into a GTK treeview (using PyGTK) - or when modifying many rows. The problem is that the model seems to get resorted after each change...

GUIs vs TUIs in Python

I'm interested in doing rapid app development in Python. Since this is mainly for prototyping purposes, I'm looking for a way of creating "rough" user interfaces. By this, I mean that they don't...

Set position of image in a window using pygtk

Is it possible to set the position of an image using pygtk? import pygtk import gtk class Example: self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.image = gtk.Image() ...

avoid having to scroll in GTK popup menu

I am working on a Gnome Panel Applet that displays a pop-up menu on clicking it's icon. The problem is, with lots of entries, the menu does not pop up with the first items visible, but somewhere...

Programmatically close gtk window

If you have a sub-window in GTK and you want to close it programmatically (e.g., pressing a save button or the escape key), is there a preferred way to close the window? E.g., window.destroy() #...

Can't pass user data in callback using Glade

I have an app I'm making with pygtk and Glade. I have a radio button series I'm trying to get working. I'm getting stumped at trying to pass user data after a button is toggled. The callback works...

How do I get the gdk window for a gtk window in C?

I'm trying to set the cursor to a watch. The problem is that gdk_set_cursor() requires a gdk_window. How do I get the gdk_window of a gtk_window in C? I've seen examples for gtkmm and pygtk but I...

How can I insert an image on a Gtk.Label. Is this possible? Or do I need to find another solution?

I have a Database with this fields: Firstname, Lastname, picture. I have a gtk.Label named infoLabel. I would like to update the label a way like this: Label.set_markup("<img...

hdf5 / h5py ImportError: libhdf5.so.7

I'm working on a project involving network messaging queues (msgpack, zmq, ...) on a RHEL 6.3 (x86_64) system. I was installing the most recent packages of glib, gevent, pygobject, pygtk, and such...

A sorted and filtered treemodel in Python Gtk+3..?

I am trying to get a treemodel (a liststore in fact) that can be filtered and also sorted. I have the following piece of code self.modelfilter =...

pygtk+glade+localization

Default locale in my system (Linux) - en_US. When I change locale to russian (LANG=ru_RU ./show_form.py), python string "hello to me" shows correctly (in console), other (glade form) - in english....

gtk MessageDialog not closing until enclosing method finishes

Here is a mocked up version of what I'm trying to do in my GUI. I have a MessageDialog which is created somewhere during the execution of a callback method. My problem is the MessageDialog won't...

How can I convert a gtk.ListStore to list?

I have a GUI with a gtk.TreeView and I would like to convert the gtk.ListStore to python list, how can I do that?

"ImportError: No module named gtk" although it is installed

The following code fails although I have the gtk bindings for python installed. This is a debian machine and I have the package named python-gtk2 installed >>> import gtk Traceback (most recent...

Python GTK - DrawingArea with opacity

I'm working on a transparent window which includes a DrawingArea widget, which gets on top with a solid background color, but I want to keep it transparent. I've tried everything, unfortunately...

Singleton send signal to actual running process

I've developed a program in Python and pyGtk and today added the singleton feature, which doesn't allow to run it if it is already running. But now I want to go further and, if its running,...

conditional class inheritance definition in python

I have an linux based python application, which make use of pygtk and gtk. It have both UI execution & command line mode execution option. In UI mode, to create main application window, class...

How to get notified about gtk.Menu popping up

I am using Ubuntu 13.04 with Unity. I created an Application Indicator using the AppIndicator class in Python, with a gtk.Menu attached to it. The menu is showing some status information about GIT...

How can I get pixels from cairo.ImageSurface?

I made a Python program that draws a black rectangle with a white circle inside it when I click on a button. I use Gtk.DrawingArea and cairo.ImageSurface. The code is the following. class App: ...

Install Poppler for Python on Mac

I need to extract pdf annotations in Python. All my searches indicate I need Poppler to do this e.g. to run this But I am having a lot of trouble installing Poppler. I'm using Python 3.4 on OS X...

Python Gtk Server's certificate is not trusted keeps popping up

I just set up the pyGTK for my PyCharm through manual install as explained in this question here. Then "Server's certificate is not trusted" keeps popping every 20-30 minutes. Server's certificate...

Detect combination of keys pressed in PyGtk3 Python3

I want to detect when CTRL + Q are pressed and then perform an action. Now, I have code to detect if one key is pressed, but not a combination. Actually, my function is: def...

Record audio+video in python webkit gtk+ browser

I have been trying to record video and audio using simple web browser that i build using webkit gtk+ with pyhton. I tried this demo and made one that work in chrome and...

How does one add an item to GTK's "recently used" file list from Python?

I'm trying to add to the "recently used" files list from Python 3 on Ubuntu. I am able to successfully read the recently used file list like this: from gi.repository import Gtk recent_mgr =...

Python : Import cairo error (2.7 & 3.6) undefined symbol: cairo_tee_surface_index

I get the following error when trying to import gtk in Python 2.7 : >>> import gtk Traceback (most recent call last): File "<stdin>", line 1, in <module> File "gtk/__init__.py", line 40, in...

Drop file in Python GUI (GTK)

I would like to write a little app who takes a selected number of file, and store the path of everything for future things. Basically: Select mixed (images, audio, video) file from Nautilus (in...

How to create a letter spacing attribute with pycairo?

I'm using Pango + Cairo (through GObject) to render text with python3.7, and would like to set the letter spacing by creating an attribute and attaching that attribute to my pango layout. In the...