I'm trying to convert the 3d array returned by cv2.imread to the continguous rgb byte array, in order to display in GTK. And below is my conversion code:
def ndarr2rgb(img):
r_arr = img[:, :, 0].ravel() # read channel
g_arr = img[:, :,…
I've been taking a quick look at the GTK 3.10 documentation for a GtkStack.
https://developer.gnome.org/gtk3/3.10/GtkStack.html
It mentions that the child added to a GtkStack is given a property "icon-name".
My question is - how can I change the…
Does anyone know how to install PyGObject on Mac OSX for Python 2.6. The current distribution available on darwinports is using Python2.4. I want a package using Python2.6
Alternatively, has anyone tried installing it from sources on a Mac?
I'm trying to implement custom Gtk.Container with PyGObject. But i got problems and even dont know is this bug, or my implementation is wrong. This is my test code snippet:
from gi.repository import Gtk, Gdk
import sys
class…
I've spend past 3 days searching in google, how can I create a screenshot with PyGTK+3 ?
There are gallizion tutorials about pyqt,pygtk+2,wx and PIL.
By the way, I don't need external programs like scrot, imlib2, imagemagick and so on.
(i know this resembles Python and d-bus: How to set up main loop? , but without complete code in the "Answer", i'm unable to figure out where i'm going wrong. it might just be a change in a Skype)
Here is my program:
import gobject
import…
Take a look at this trivial python gobject program:
import threading
import gobject
import time
def f():
while True:
print "HELLO"
time.sleep(1)
threading.Thread(target=f).start()
gobject.MainLoop().run()
It spawns a thread…
How can I create a ComboBox that displays a list of entries, each containing some text and an icon?
I'm using Python and GTK3 with GObject introspection.
I'm working in a program that is written in Gtk+ 3 and Python. A related question I asked about my program is here.
Now, that I advanced a bit more, I have the following imports:
import aplpy
import montage
import subprocess
from gi.repository…
I wrote global shortcut example for hide and show my windows with key like 'F12', I used python-xlib and some script named 'pyxhook' everything works fine except when i want to hide() and show() window few times my proccess turning a zombie, but…
What is gdk_property_change binding in PyGobject? I've tried Gdk.property_changed, Gdk.Property.change etc. Function Gdk.property_get exist and everything else works great. My system is: Ubuntu 12.10, Python 3.2.3, PyGObject 3.4.0 and Gtk 3.6.
I'm developing a python plugin for Rhythmbox - this contains a GtkScrolledWindow with a child which is a GtkIconView. The IconView is fed from a Gtk.TreeModel.
It looks like this:
Currently - and somewhat inefficient, every icon is drawn for every…
I would like to subclass an existing Gtk widget and get it to work with Glade3. The code is all python, and I'm using PyGObject.
What I want to do is extend Gtk.TextView and be able to add it to my glade UI as if it were a native widget.
I read…
I'm working on a Python Gtk3 app on Ubuntu, which primarily uses WebView from WebKit. I couldn't find all the methods available to WebView object in python, currently I only know its open() method, so, where can I get detailed reference to all its…
I want to set timer in a thread and kill that thread when I want to unset the timer set by gobject.timeout_add, is this a good way to do this?
basically I want to run a function for every 180 seconds but I want to be able to stop it whenever I want…