【问题标题】:What is the gnome keyring api for PyGi?PyGi 的 gnome 密钥环 api 是什么?
【发布时间】:2011-09-08 20:16:15
【问题描述】:

有人可以在 PyGi 中找到 gnome keyring api 吗?

我曾经这样做过:

import gnomekeyring

现在我想使用新的 python/gobject 内省,所以它会是这样的:

from gi.repository import GnomeKeyring

但我找不到要加载的模块。有人知道我是否/如何使用 python gobject introspection 访问 Gnome Keyring api?

【问题讨论】:

    标签: python introspection gobject pygobject


    【解决方案1】:

    要访问 Secret Service (gnome-keyring),您应该使用 libsecret(替换 libgnome-keyring 的新库)

    它有 builtin 支持 Gobject Introspection 所以这应该可以工作:

    from gi.repository import Secret
    

    【讨论】:

      【解决方案2】:

      PyGI 仍在开发和适应中,因此它仍然没有任何官方文档或 API 参考。每次我需要尝试使用 PyGI 时,我都会检查 C Gnome Development Reference,在那里你可以找到 gnome-keyring 的 C 文档。它似乎与旧的 gnomekeyring 非常相似。

      【讨论】:

        猜你喜欢
        • 2012-12-01
        • 1970-01-01
        • 2010-11-29
        • 2019-12-25
        • 2011-12-30
        • 1970-01-01
        • 1970-01-01
        • 2013-07-16
        • 2023-03-25
        相关资源
        最近更新 更多