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
338
votes
6 answers

Best practices for adding .gitignore file for Python projects?

I'm trying to collect some of my default settings, and one thing I realized I don't have a standard for is .gitignore files. There's a great thread showing a good .gitignore for Visual Studio projects, but I don't see many recommendations for Python…
ewall
  • 27,179
  • 15
  • 70
  • 84
47
votes
2 answers

GtkDialog mapped without a transient parent

I have a GUI built in Glade (3.18) which is called by a Python 3 program (using PyGObject). I get a lot of warnings when running the program (Fedora 21) that say: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. How…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
47
votes
3 answers

wxPython vs PyQt vs PyGTK: when and what to use?

Need advise from those who have minimum health experience to design GUI interfaces with Python. When and what to choose depending of GUI complexity? Which GUI builders can we use to have a better development quality? This is my first GUI design,…
user1630938
41
votes
5 answers

Installing PyGtk in virtualenv

So I am trying to run a simple matplotlib example in my virtualenv (in the console). Here's the code: import matplotlib matplotlib.use('GTKAgg') import matplotlib.pyplot as plt radius = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] area = [3.14159, 12.56636,…
George Eracleous
  • 4,278
  • 6
  • 41
  • 50
40
votes
4 answers

What's the recommended way to unittest Python GUI applications?

I'm currently foolish enough to try to maintaintain two parallel code bases for a Python desktop application, one using PyGObject introspection for GTK 3 and one using PyGTK for GTK 2. I work mainly on the PyGObject branch and then I port changes…
user626998
37
votes
5 answers

Is there a gi.repository documentation for python?

I'm looking for a gi.repository module documentation and I can't find anything on the internet. All I found is documentation of new Gtk3 libraries for C, or old PyGtk 2.0 Reference Manual I'm looking for something like PyGtk 2.0 Reference Manual but…
Jan Vorcak
  • 19,261
  • 14
  • 54
  • 90
35
votes
6 answers

Where is PyGTK for Mac OS X?

Is there a binary out there for the current mac os x, python for PyGTK? I work with multiple desktop environments (mac, windows, gnome) and really consider python's lack of cross platform GUI's a problem. Does anyone know where I can find a built…
Ronaldo Nascimento
  • 1,571
  • 3
  • 21
  • 40
33
votes
11 answers

Glade or no glade: What is the best way to use PyGtk?

I've been learning python for a while now with some success. I even managed to create one or two (simple) programs using PyGtk + Glade. The thing is: I am not sure if the best way to use GTK with python is by building the interfaces using Glade. I…
Flávio Amieiro
  • 41,644
  • 8
  • 32
  • 24
27
votes
1 answer

Has threading in GTK w/ Python changed in PyGObject introspection?

I'm in the process of converting a program from PyGTK to PyGObject introspection for the first time and I've hit a roadblock with threading. I have a process that takes some time to complete, so I pop up a dialog with a progress bar on it and I use…
user626998
26
votes
1 answer

Gettext message catalogues from virtual dir within PYZ for GtkBuilder widgets

Is there an established approach to embed gettext locale/xy/LC_MESSAGES/* in a PYZ bundle? Specifically to have Gtks automatic widget translation pick them up from within the ZIP archive. For other embedded resources pkgutil.get_deta or…
mario
  • 144,265
  • 20
  • 237
  • 291
26
votes
1 answer

How to do multiple arguments with Python Popen?

I am trying to make a PyGtk Gui, that has a button. When the user presses this button, gnome-terminal prompts the user to write their password. Then it will clone this Git repository for gedit JQuery snippets. And then, it copies the js.xml file to…
Voidcode
  • 1,229
  • 1
  • 18
  • 22
25
votes
5 answers

Virtualenv on Ubuntu with no site-packages

I've been using virtualenv lately while developing in python. I like the idea of a segregated development environment using the --no-site-packages option, but doing this while developing a PyGTK app can be a bit tricky. The PyGTK modules are…
Jeremy Cantrell
  • 26,392
  • 13
  • 55
  • 78
23
votes
6 answers

How to auto-scroll a gtk.scrolledwindow?

I have a treeview-widget inside a ScrolledWindow, which is populated during runtime. I want the ScrolledWindow to auto-scroll to the end of the list. I "solved" the problem, by adjusting the vadjustment of the ScrolledWindow, everytime a row is…
Fookatchu
  • 7,125
  • 5
  • 28
  • 26
23
votes
6 answers

Scale an image in GTK

In GTK, how can I scale an image? Right now I load images with PIL and scale them beforehand, but is there a way to do it with GTK?
Claudiu
  • 224,032
  • 165
  • 485
  • 680
21
votes
2 answers

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 = Gtk.RecentManager.get_default() for item in…
Laurence Gonsalves
  • 137,896
  • 35
  • 246
  • 299
1
2 3
99 100