Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.python > #7668
| Subject | Re: Gtk3 |
|---|---|
| References | <TJE_y.45330$pt.41748@tornado.fastwebnet.it> <nhihbg$ih8$4@dont-email.me> |
| Newsgroups | it.comp.lang.python |
| From | Smith <smith@smith.it> |
| Message-ID | <573D5C1B.4010506@smith.it> (permalink) |
| Date | 2016-05-19 08:24 +0200 |
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 >> <module> >> 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) <ipython-input-8-b05651a8518b> in <module>() ----> 1 dir(gi.repository) AttributeError: module 'gi' has no attribute 'repository'
Back to it.comp.lang.python | Previous | Next — Previous in thread | Find similar
Gtk3 Smith <smith@smith.it> - 2016-05-17 15:09 +0200
Re: Gtk3 Smith <smith@smith.it> - 2016-05-17 15:27 +0200
Re: Gtk3 Alessandro Pellizzari <shuriken@amiran.it> - 2016-05-17 14:41 +0100
Re: Gtk3 Smith <smith@smith.it> - 2016-05-17 16:25 +0200
Re: Gtk3 Smith <smith@smith.it> - 2016-05-18 09:07 +0200
Re: Gtk3 Max_Adamo <maxadamo@usenet.cnntp.org> - 2016-05-18 19:48 +0000
Re: Gtk3 Max_Adamo <maxadamo@usenet.cnntp.org> - 2016-05-18 19:52 +0000
Re: Gtk3 Max_Adamo <maxadamo@usenet.cnntp.org> - 2016-05-18 19:55 +0000
Re: Gtk3 Smith <smith@smith.it> - 2016-05-19 08:24 +0200
csiph-web