Questions tagged [pygobject]

GTK+ and other GObject bindings are provided by PyGObject through introspection.

Python library providing bindings for GObject based libraries through GObject-Introspection.

For more information:

817 questions
3
votes
1 answer

Adding button_press_event to Gtk.Image?

I try to create a custom Gtk.Image that handles the "clicked" signal but when I try to emit a signal from the custom Gtk.Image ,but can't figure out why doesn't the signal emit when there is a button press event. class WindowButton(Gtk.Image): …
user6778973
3
votes
0 answers

Parallel drawing with GTK and Cairo in Python 3

I am making a GTK application that will draw complex images that can take long time to finish. Because of that I can't do the drawing in the DrawingArea's 'draw' callback. I decided to use Python's multiprocessing module that allows true parallelism…
3
votes
2 answers

PyGObject Progress Bar in Notify.Notification

I am using PyGObject with Python 3 and I want to display a notification using a Notify.Notification which has a progress bar in it. The progress bar doesn't need to update on its own/asynchronously or anything - it can (and should) be static,…
Tomha
  • 847
  • 2
  • 8
  • 16
3
votes
1 answer

PyGObject under Windows: Could not locate gdk_pixbuf_new_from_file

I'm trying to use GdkPixbuf.Pixbuf.new_from_file() to create a new pixbuf from file, but Python interpreter gives me the following error: GLib.Error: g-invoke-error-quark: Could not locate gdk_pixbuf_new_from_file: 'gdk_pixbuf_new_from_file' The…
pozzugno
  • 750
  • 6
  • 19
3
votes
0 answers

Static width for a Gtk.Box layout container with children of dynamically varying width

I have a Gtk.Box with a vertical orientation for which i would like to have a static width. The reason is that there are children within the Box with changing sizes, and i would like the whole layout to have the same look, instead of as it is now…
sunyata
  • 1,843
  • 5
  • 27
  • 41
3
votes
1 answer

Some questions about switches in python

This is my first Question here at StackOverflow, so please be patient with me if some info isn't present or I missed something important, but anyways i'll do my best :) Recently I started to code in Python2.7, so I'm not very good at it. While…
PythonNoob
  • 235
  • 1
  • 2
  • 12
3
votes
0 answers

PyGObject: Scale/Range as Gtk MenuItem?

I'm trying to create a volume application indicator in linux using python but I couldn't find a way to use a Gtk.Scale as child of Gtk.MenuItem. I could add Gtk.Scale object as child but the Scale widget will not be able to capture my mouse…
Richard Wong
  • 3,498
  • 4
  • 19
  • 19
3
votes
1 answer

python bindings for gstreamer: how to import typelib

I was building gstreamer latest version on my raspberry pi. I wanted to have python bindings, hence I installed gobject-introspection-1.0 and pygobject-3.18.2 before compiling the gstreamer and its plugins. At the end of the build of gstreamer and…
3
votes
2 answers

How to access GParamSpec-related functions from Python GObject Instrospection?

I am wondering whether GObject Introspection is currently broken (with Python at least)... 1. Short code example Let's try this piece of code to obtain a GParamSpec struct: # Various imports import gi gi.require_version('Gst', '1.0') from…
JohnW
  • 505
  • 3
  • 14
3
votes
1 answer

Changing Gtk accelerator set by glade

I'm using Gtk (python3) + Glade to create an application. I've set some accelerators in glade like this : gtk-quit
elnabo
  • 264
  • 1
  • 2
  • 10
3
votes
1 answer

Python program with Notification in Gnome Shell doesn't work

I'm writing a python program that takes info from a webpage and show it on Notification in Gnome Shell. I'm using Arch, so I want to start this program at startup and if there is any change on the webpage, it will notify me. Here is my code: import…
mozart
  • 129
  • 11
3
votes
0 answers

Cannot import gi from PyGi in Spyder

I primarily use python for scientific computing and have become quite accustomed to Spyder. I am working on a mutlimedia project and would like to use the Gstreamer bindings for python. The best way I could find to install Gstreamer on Windows was…
Conner Phillips
  • 403
  • 4
  • 7
3
votes
0 answers

Python GTK3 on Windows not fully working?

I started working through the PyGObject and GTK3 tutorials here... http://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html and as soon as I got to the second example, Python would just hang up and not do anything. I've stripped away…
pure_bordem
  • 159
  • 3
  • 15
3
votes
1 answer

Load GTK-Glade translations in Windows using Python/PyGObject

I have a Python script that loads a Glade-GUI that can be translated. Everything works fine under Linux, but I am having a lot of trouble understanding the necessary steps on Windows. All that seems necessary under Linux is: import…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
3
votes
1 answer

Install python3-gi for Travis-CI and Python >= 3.3

What is the correct way to install python3-gi on Travis-CI using the .travis.yml file? The past recommendation was to use Python 3.2 (Travis-ci & Gobject introspection), but I would prefer testing against more recent versions. I did try a few…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54