[gnome-love] Python and Gnome




Hello All,

I am trying to knock up an application from bits of examples I find on the Internet.


I began coding from a menu bar example I found on the Internet.

The example starts:
from gi.repository import Gtk, Gdk
import gui

and uses: Gtk.UIManager

I have tried merging it with other examples, but get a conflict. Please see attached image.

An other example which causes the conflict seems to me like another version. It contains:
import pygtk
pygtk.require('2.0')
import gtk

and uses: gtk.Window(gtk.WINDOW_TOPLEVEL)
and uses gtk.TreeStore(str)

I am sure you will immediately be able to  spot what I am getting wrong. I am finding it difficult from disparate sources on the Internet to know why, or which version to use.

Would someone kindly send me a link to the docs which I should be using. Ie the latest version that all you guys are using.

Thanks,
Anthony



Attachment: pygtk-error.png
Description: PNG image



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]