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
13
votes
7 answers

Stock Icons not shown on buttons

self.button = gtk.Button(stock=gtk.STOCK_DELETE) Only Shows: Delete
aberkowitz
  • 147
  • 1
  • 1
  • 7
13
votes
3 answers

How to escape characters in Pango markup?

My program has a gtk.TreeView which displays a gtk.ListStore. The gtk.ListStore contains strings like this: ""+site_title+""+"\n"+URL Where URL is (obviously) a URL string. Sometimes there are characters in URL…
Isaiah
  • 4,201
  • 4
  • 27
  • 40
12
votes
2 answers

Displaying PDF files with python3

I want to write a python3/PyGTK3 application that displays PDF files and I was not able to find a python package that allows me to do that. There is pypoppler, but it looks outdated (?) and does not seem to support python3 (?) Do you have any…
Fabian Henze
  • 980
  • 1
  • 10
  • 27
12
votes
2 answers

Use glade with pygobject Gtk3

I am converting a script to use Gtk3 using the migration guide (Porting GTK2 to GTK3). I converted my import pygtk to a from gi.repository import Gtk and so on... I'm stuck because the glade module was loaded from module gtk: import gtk import…
MP0
  • 1,033
  • 2
  • 10
  • 17
12
votes
5 answers

ImportError: No module named _backend_gdk

I am starting to get some insight into interactive plotting with python and matplotlib using pyGTK+. Therefore I took a look at the example given at the matplotlib website. This is a short exerpt of the Code: #!/usr/bin/env python """ Example of…
user1371788
12
votes
2 answers

Running function 5 seconds after pygtk widget is shown

How to run function 5 seconds after pygtk widget is shown?
Jan Tojnar
  • 5,306
  • 3
  • 29
  • 49
12
votes
5 answers

How do I install PyGTK / PyGobject on Windows with Python 2.6?

I have an application which depends on PyGTK, PyGobject, and PyCairo that I built to work on Linux. I want to port it over to windows, but when I execute import gobject I get this: Traceback (most recent call last): import gobject File…
lfaraone
  • 49,562
  • 17
  • 52
  • 70
12
votes
5 answers

What are the advantages of PyQt over PyGTK and vice-versa?

I have an application whose GUI is to be remade for ergonomic reasons. It was written in PyGTK and I am wondering if I should switch to PyQt to ease future developments or not. This application has a mostly classical UI with buttons, toolbars,…
Xion345
  • 1,627
  • 12
  • 26
12
votes
4 answers

Run a function every X minutes - Python

I'm using Python and PyGTK. I'm interested in running a certain function, which gets data from a serial port and saves it, every several minutes. Currently, I'm using the sleep() function in the time library. In order to be able to do processing, I…
mouche
  • 1,785
  • 1
  • 16
  • 22
11
votes
2 answers

Gtk.StatusIcon PopupMenu in python

im trying to port some small examples from PyGTK to the new PyGobject bindings, but ive hit a roadblock with a popupmenu, despite getting no errors, no menu is being shown on rightclick, here is the code, from gi.repository import Gtk class…
Mike
  • 400
  • 2
  • 12
11
votes
9 answers

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 "", line 1, in File "gtk/__init__.py", line 40, in from gtk import _gtk File…
rmn
  • 81
  • 1
  • 11
11
votes
3 answers

How to repeatedly show a Dialog with PyGTK / Gtkbuilder?

I have created a PyGTK application that shows a Dialog when the user presses a button. The dialog is loaded in my __init__ method with: builder = gtk.Builder() builder.add_from_file("filename") builder.connect_signals(self) self.myDialog =…
Julian
  • 994
  • 1
  • 9
  • 19
11
votes
2 answers

Python GUI programming, Licensing and Understanding

I have been working on python recently and I have been making quite alot of research on the best x-platform UI toolkit. I dont really want something heavy because i am a lone developing switching from c# and there is possibility I will be selling…
Temitayo
  • 802
  • 2
  • 12
  • 28
11
votes
3 answers

Why is my simple python gtk+cairo program running so slowly/stutteringly?

My program draws circles moving on the window. I think I must be missing some basic gtk/cairo concept because it seems to be running too slowly/stutteringly for what I am doing. Any ideas? Thanks for any help! #!/usr/bin/python import gtk import…
shino
  • 4,562
  • 5
  • 38
  • 57
11
votes
6 answers

How to get list opened windows in PyGTK or GTK in Ubuntu?

How to get list opened windows in PyGTK or GTK or other programming language? in Ubuntu? edit: i want get list paths opened directories on desktop!
john
  • 868
  • 1
  • 8
  • 8