我使用的是基于Ubuntu14.04的LinuxMint17
我安装了:
我有以下脚本:
#!/usr/bin/python
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import gnomekeyring
但我得到一个错误:
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed import gobject._gobject
我能做些什么来修复这个?在
编辑: Get attributes of GnomeKeyring key with Python 2.7 GTK3 on Ubuntu 14.04
python gnomekeyring使用Gtk+2,不能在与Gtk+3相同的进程中使用。在
您应该能够使用GnomeKeyring-1.0地理信息库公司名称:
正如oxideworks在评论中指出的,当前的GnomeKeyring已经将它的所有API标记为弃用:libsecrets“Secret”D-busapi(在GNOME上由GnomeKeyring提供)应该能够做同样的事情。在
这里有一个Python API reference,但是规范引用有一些python examples以及关于从gnome keyring迁移的建议,但是要注意,后者将主要讨论C API。在
相关问题 更多 >
编程相关推荐