I'm start programming in Python and I want learn GTK+ 3. I'm using a Distro based on Ubuntu 12.04 (Elementary OS) and I'm having some troubles to install GTK+ 3 in Python.
Okay, I will show you what I'm trying do.
First -> Following this tuto, I wrote this simple code for generate a Window using GTK+ 3.
#!/usr/bin/python
from gi.repository import Gtk
win = Gtk.window()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
Second -> I have the following error:
Traceback (most recent call last):
File "main.py", line 4, in <module>
win = Gtk.window()
File "/usr/lib/python2.7/dist-packages/gi/module.py", line 243, in __getattr__
return getattr(self._introspection_module, name)
File "/usr/lib/python2.7/dist-packages/gi/module.py", line 105, in __getattr__
self.__name__, name))
AttributeError: 'gi.repository.Gtk' object has no attribute 'window'
Third -> Trying to find the error, I found this guide that I skipped before try to run "main.py". I'm trying to follow this guide because I don't know if Elementary (Ubuntu 12.04) have GTK+ 3, PyGObject and other things necessary for develop GTK+ 3 applications with Python, by default.
Forth -> Summarizing, I'm having problems trying to install JHBuild. I successfully followed this guide of how to install Jhbuild until 2.1 item. But when I try to run
jhbuild sanitycheck
I have the following error message:
jhbuild: could not load config file, /home/paladini/.jhbuildrc is missing
How can I solve this issues and finally use GTK+ 3 with Python?
examples/sample.jhbuildrc
as~/.jhbuildrc
and try again, won't hurt much.