Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news1.dtag.de!feedme.news.telefonica.de!telefonica.de!diesel.cu.mi.it!bofh.it!tornado.fastwebnet.it!53ab2750!not-for-mail Subject: Re: Gtk3 References: Newsgroups: it.comp.lang.python From: Smith Message-ID: <573D5C1B.4010506@smith.it> User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 88 Date: Thu, 19 May 2016 08:24:27 +0200 NNTP-Posting-Host: 93.38.251.60 X-Complaints-To: newsmaster@fastweb.it X-Trace: tornado.fastwebnet.it 1463639067 93.38.251.60 (Thu, 19 May 2016 08:24:27 CEST) NNTP-Posting-Date: Thu, 19 May 2016 08:24:27 CEST Xref: csiph.com it.comp.lang.python:7668 On 18/05/2016 21:55, Max_Adamo wrote: > Il Tue, 17 May 2016 15:09:07 +0200, Smith ha scritto: > >> ** (gtk-prova.py:11675): WARNING **: Couldn't connect to accessibility >> bus: Failed to connect to socket /tmp/dbus-AmrZgbkpR2: Connection >> refused Traceback (most recent call last): > > qui ho l'impressione che non ha un demone dbus attivo. > > >> File "/home/pippo/PycharmProjects/Progetto1/gtk-prova.py", line 8, in >> >> Gtk.main() >> AttributeError: module 'gi.overrides.Gtk' has no attribute 'main' > > 1) come ti ha detto Alessandro, devi usare gi.repository > > 2) non c'è bisogno di usare tree dalla shell. Fai cosi (e vedi che Gtk > c'è): > > import gi.repository > > dir(gi.repository) > ['Atk', > 'GLib', > 'GModule', > 'GObject', > 'Gdk', > 'GdkPixbuf', > 'GdkX11', > 'Gio', > 'Gtk', > 'Pango', > '__builtins__', > '__doc__', > '__file__', > '__name__', > '__package__', > '__path__', > 'absolute_import', > 'cairo', > 'xlib'] > > > In [3]: dir(gi) Out[3]: ['PyGIDeprecationWarning', 'PyGIWarning', 'Repository', '_API', '_DummyStaticModule', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_error', '_gi', '_gobject', '_overridesdir', '_static_binding_error', '_versions', 'absolute_import', 'check_version', 'extend_path', 'get_required_version', 'importlib', 'os', 'require_foreign', 'require_version', 'sys', 'types', 'version_info'] In [8]: dir(gi.repository) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ----> 1 dir(gi.repository) AttributeError: module 'gi' has no attribute 'repository'