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
4
votes
2 answers

How to dispose GtkWidget's in Python, GTK3 and PyGObject?

I am creating a plug-in to a GTK3 program. This plug-in can be enabled or disabled at runtime. When enabled, it should populate its GUI in a given area (a GtkBin) in the host program. When disabled, it should remove itself from that area. This…
wks
  • 1,158
  • 1
  • 7
  • 12
4
votes
1 answer

Creating a custom GtkCellRenderer with PyGobject

I'm in the process of writing a Gtk application. Up 'til know I have been using pygtk but because that has been deprecated in favor of PyGobject I have decided to make the switch. Back in the time of pygtk one could extend the…
mandel
  • 2,921
  • 3
  • 23
  • 27
4
votes
2 answers

Gtk+ 3 - Issues writing and autoscrolling in a TextView

I have a Gtk.ScrolledWindow() with inside a Gtk.TextView(), (I'm using PyGObject introspection). After I insert some text and autoscroll from another thread, calling several times in a row the method append_text, I get a couple of warnings then the…
Rik Poggi
  • 28,332
  • 6
  • 65
  • 82
4
votes
2 answers

unresponsive drag and drop in pygobject

im trying to get drag and drop working well in pygobject, but it is slow and unresponsive, 90% of the time i have to wave the item i am dragging around before i can drop it successfully, can anyone see if i am doing it incorrectly or is this a bug…
Mike
  • 400
  • 2
  • 12
4
votes
3 answers

How to install PyGI (Python Gobject Introspection) on Windows?

Installing the python interpreter: http://python.org/ftp/python/2.7.2/python-2.7.2.msi and: http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.0.win32-py2.7.msi run: python import gtk ...works Is there a PyGI all in one…
huroliu
  • 43
  • 1
  • 3
4
votes
1 answer

How can I call methods on a GObject class written in C from python?

I am trying to create a GObject class in C and annotate it in a way, so that I can use the class from Python - but I think am missing something, since I get weird errors that I can't understand. Any help would be much appreciated! The class works as…
AHM
  • 5,145
  • 34
  • 37
4
votes
0 answers

Writing direct image data into a Gtk.Window, or ways to improve the performance of image buffers

I am computing live image data at 60 fps. I want to blit this into a Gtk.Window preferably in a zero-copy fashion. The buffer data is created by an optimised C module which hooks into Python. I can use GdkPixbuf.new() to create the buffer and…
Thomas O
  • 6,026
  • 12
  • 42
  • 60
4
votes
1 answer

Is there a way to get a list of all installed fonts in the system in GTK

Hi I am making a Gtk application and need to run a code to get a list of all the installed fonts in my system to use it to create a list similar to the Gtk.FontChooserWidget, is there any built-in function in Gtk that can do this ?
user10864898
4
votes
1 answer

How do I properly install PyGObject? (OSX)

I want to run existing simple examples and write some simple code using GStreamer - specifically, using its Python bindings. I want to install the packages etc to enable that. Here's an…
Luke
  • 61
  • 1
  • 3
4
votes
1 answer

AppSink methods missing: AttributeError: 'GstAppSink' object has no attribute 'is_eos'

I'm trying to use the AppSink sink to read samples from it but none of the AppSink methods seem to exist on the object. import gi gi.require_version("Gst", "1.0") from gi.repository import Gst Gst.init() pipe = Gst.parse_launch("audiotestsrc !…
SBSTP
  • 3,479
  • 6
  • 30
  • 41
4
votes
1 answer

Install PyInstaller on MSYS2 MinGW

I want to install PyInstaller on MinGW but installing with pip fails with an error. distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module How do I install it correctly? If this is not possible, what other options do I have?…
4
votes
0 answers

Gtk3 | Python: Namespace Gtk not available, Typelib file for namespace 'Gtk' (any version) not found (using macOS)

I'm trying to start making a little GTK program, and to test GTK installation and config I'm trying to execute a simple helloworld script. Just using a simple example given by pygobject documentation: import gi gi.require_version("Gtk", "3.0") from…
Otloal
  • 85
  • 2
  • 9
4
votes
1 answer

How do I install PyGObject?

I am trying to install PyGtk on windows 7 for Python 2.7, but when go to use pip to install PyGtk it says i need PyGObject (Go figure) so I installed the Visual C++ package for Python (I know I have the correct version) and tried using pip to…
Kaden Biel
  • 104
  • 1
  • 8
4
votes
1 answer

Python GTK resizing large image to fit inside a window

Important note: I'm using PyGObject to get access to the GTK widgets, not PyGTK. That's what makes this question different from similar ones: PyGTK: How do I make an image automatically scale to fit it's parent widget? Scale an image in GTK I want…
illright
  • 3,991
  • 2
  • 29
  • 54
4
votes
0 answers

mixing pygobject (python wrapper) and C GTK+

I'm interested in being able to mix python and C code with GTK+. I'm capable of creating shared object libs in C and accessing them from python. I'm wondering how to gain access to the GtkWidget pointer from a pygobject class and pass that into the…