Fwd: Cooperation between gaphas and Gtk3 for python

22 views
Skip to first unread message

Adrian Boguszewski

unread,
Apr 2, 2015, 6:05:48 PM4/2/15
to gapho...@googlegroups.com
Hi,

I have a question. Does gaphas support Gtk3? Because I wrote just two lines of code in following order:

from gaphas.tool import Tool
from gi.repository import Gtk

and I got:

Traceback (most recent call last):
  File "/home/adek/PycharmProjects/untitled/main.py", line 3, in <module>
    from gi.repository import Gtk
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 39, in <module>
    raise ImportError(_static_binding_error)
ImportError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183

In that order:

from gi.repository import Gtk
from gaphas.tool import Tool

I received:

Traceback (most recent call last):
  File "/home/adek/PycharmProjects/untitled/main.py", line 3, in <module>
    from gaphas.tool import Tool
  File "/usr/local/lib/python2.7/dist-packages/gaphas/__init__.py", line 26, in <module>
    from canvas import Canvas
  File "/usr/local/lib/python2.7/dist-packages/gaphas/canvas.py", line 40, in <module>
    from gaphas.decorators import nonrecursive, async, PRIORITY_HIGH_IDLE
  File "/usr/local/lib/python2.7/dist-packages/gaphas/decorators.py", line 10, in <module>
    from gobject import PRIORITY_HIGH, PRIORITY_HIGH_IDLE, PRIORITY_DEFAULT, \
RuntimeError: sys.path must be a list of directory names

I use Python 2.7.9. sys.path returns
['/home/adek/PycharmProjects/untitled', '/home/adek/PycharmProjects/untitled', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7']


Thanks! Regards,
Adrian Boguszewski

Arjan Molenaar

unread,
Apr 3, 2015, 3:41:54 AM4/3/15
to gapho...@googlegroups.com
Hi Adrian,

I have ported the code to Gtk3, it’s in the Gtk3 branch. I have not released it as such. If you’re able to test that branch I can release it (I only did some simple demo-script tests).

Regards,

Arjan

--
You received this message because you are subscribed to the Google Groups "gaphor-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaphor-dev+...@googlegroups.com.
To post to this group, send email to gapho...@googlegroups.com.
Visit this group at http://groups.google.com/group/gaphor-dev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages