[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[plamo:31801] python と gtk3
-
From:KATOH Yasufumi
-
Date:Wed, 26 Nov 2014 20:49:27 +0900 (JST)
- Subject: [plamo:31801] python と gtk3
- From: KATOH Yasufumi <karma@xxxxxxxxxxxxxxxx>
- Date: Wed, 26 Nov 2014 20:49:26 +0900
- User-agent: Wanderlust/2.15.9 (Almost Unreal) EMIKO/1.14.1(Choanoflagellata) FLIM/1.14.9 (五条)APEL/10.8 EasyPG/1.0.0 Emacs/24.4 (x86_64-unknown-linux-gnu) MULE/6.0(花散里)
加藤泰文です。
python で gtk3 を使ってるアプリが動かない事があります。gtk+ と
pygobject3 とかその辺りの話?
#!/usr/bin/python
from gi.repository import Gtk
print Gtk._version
print Gtk.get_major_version
こんなコードを書いて、実行すると
$ python test.py
/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py:48: RuntimeWarning: You have imported the Gtk 2.0 module. Because Gtk 2.0 was not designed for use with introspection some of the interfaces and API will fail. As such this is not supported by the pygobject development team and we encourage you to port your app to Gtk 3 or greater. PyGTK is the recomended python module to use with Gtk 2.0
warnings.warn(warn_msg, RuntimeWarning)
2.0
Traceback (most recent call last):
File "test.py", line 5, in <module>
print Gtk.get_major_version
File "/usr/lib64/python2.7/site-packages/gi/module.py", line 316, in __getattr__
return getattr(self._introspection_module, name)
File "/usr/lib64/python2.7/site-packages/gi/module.py", line 135, in __getattr__
self.__name__, name))
AttributeError: 'gi.repository.Gtk' object has no attribute 'get_major_version'
こんな感じになります。まだまだこの周辺で色々更新しないとダメ?
--
==============================================
(((( 加藤泰文
○-○ karma @ jazz.email.ne.jp
==============================================
(Web Page) http://www.ten-forward.ws/
==============================================
- Follow-Ups
-
- [plamo:31802] Re: python と gtk3, KATOH Yasufumi
[検索ページ]
[メール一覧]
Plamo ML 公開システム