Okay so I hadn't found through google search for gtk3+ an api for Gdk package gi.repository libraries...
or at least trying to determine pythonic implementation routines of cairo objects in gtk 3+ and am having difficulty finding translated resources from gtk 2+ to 3+, given tutorial at this site. Notwithstanding that written information is in c fine, seems only including code snippets where c translation seems a bit formidable from text in terms of pythonic equivalents. While other non api but tutorial site here does furnish implementation examples, it is strictly devoted to Gtk package objects...very basic stuff here and I hadn't generally found Cairo implement examples.
At this point constructed very basic module directory search of say either gtk or gdk libraries in the gi.repository. At least running in python this can furnish function/object data pythonic calls here.
So firstly I'd mention if you are using Idle, you'd need to load the path to gi.repository...you can do this with the following lines:
import sys
a = sys.path
a.append('/usr/lib/python2.7/dist-packages')
or from your terminal launching python the usual way ($python) normally if you have something like quickly installed, the path above should by default be installed.
Similarly if you need to load the path any module, you can add this using the method above with your path assigned.
from gi.repository import Gtk
from gi.repository import Gdk
def searchword(word):
def findresult(searchlist):
results = []
for item in searchlist:
if word in item:
results.append(item)
return results
resultsa = []
resultsb = []
a = dir(Gtk)
b = dir(Gdk)
asearch = findresult(a)
bsearch = findresult(b)
return asearch, bsearch
So this particular code, allows for a search of the Gtk, and Gdk directories...
this may give some additional python translated calls for utilising these libraries.
Subscribe to:
Post Comments (Atom)
A long time
The years have passed. Life presents all the new challenges and stresses. I am thinking of the Ship of Theseus and re-examining this ...
-
from gi.repository import Gtk, Gdk, cairo, Pango, PangoCairo import math import sys RADIUS = 150 N_WORDS = 10 FONT = "Sans Bold 27...
-
I've looked through a series of web sites on this topic, any number of these ranging in various degrees of technical information, but...
-
I recently decided to do some work on Ogre again. Here are some recent encounters...and work around that could help for starting. S...
No comments:
Post a Comment