OSX: importing gi from pygobject3: “ImportError: cannot import name _gi”

2018-04-12 Thread Krister
Hello all, I had a working python program that uses GTK3 as installed with homebrew. After updating my OSX system I now get the error: import gi File "/usr/local/lib/python2.7/site-packages/gi/__init__.py", line 42, in ImportError: cannot import name _gi The minimal example that reproduces this

the directory for current theme used by Gtk

2018-03-06 Thread Krister
I'm trying to get pyinstaller to import the minimum number of files necessary for a Gtk theme: https://github.com/pyinstaller/pyinstaller/issues/3084. I can get the current theme name using the code: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk

the directory for current theme used by Gtk

2017-12-08 Thread Krister
I'm trying to get pyinstaller to minimize the number of imported files for a Gtk theme: https://github.com/pyinstaller/pyinstaller/issues/3084. I can get the current theme name using the code: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk

Re: Fwd: registering Gtk.EventButton as argument to custom signal

2016-05-04 Thread Krister Swenson
> Looking at this error, are you using the xdot library by any chance? Haha... yes, my code is based on xdot.py. > I had to port this to Python3 and GTK3 a year or two ago for our > application. I looked it up and this is the line in my xdot port with a > special GTK3 comment that I had to ch

Fwd: registering Gtk.EventButton as argument to custom signal

2016-05-03 Thread Krister Swenson
Hello, I'm trying to port my open source (https://bitbucket.org/thekswenson/alpha) GTK 2 code to GTK 3. A have defined a custom signal as follows: __gsignals__ = {'clicked' : (GObject.SignalFlags.RUN_LAST, None, (GObject.TYPE_STRING, Gdk.Event))} I later emit this s