Gnumeric Python插件:服务文件打开器和文件

2024-05-12 19:44:00 发布

您现在位置:Python中文网/ 问答频道 /正文

是否可以为file_openerfile_saver服务编写gnumeric python插件?在

它似乎是在python加载程序插件中实现的,Gnome documentation中有相应的部分。在

但是示例插件gnome-glossary,它是pythonfile_saver插件,引发了一个错误ImportError: No module named gsf,我无法写入API给出的输出对象:

def so_file_save(wb, output):
    output.props.write("toto")

产生错误:

^{pr2}$

还有这个gobject.GProps声明为__gtype__ : GsfOutputStdio的对象


Tags: 对象程序插件示例outputdocumentation错误opener
1条回答
网友
1楼 · 发布于 2024-05-12 19:44:00

很久以前就不支持'libgsf'的python绑定。正如您在旧的README-python中看到的:

I wrote these bindings in 2002, and they haven't been updated since. They were never part of a standard build, but it was possible to build them by following the instructions below. It will probably take some work to make them work with current versions of autotools and pygobject. Bindings would have to be revalidated, and extended to match the current API of libgsf.

I do not plan to do further work on these bindings. If anybody wants to pick them up, please feel free.

Jon K Hellan [...] 2006-02-24

这就解释了gnome-glossary失败的原因。另外,参数输出似乎有问题,它显示为GObject,但不是GsfOutputStdio(您只能看到属性,但是您没有访问任何方法的权限)。在

这不是你要找的解决方案,而是对你所看到的一切的一种解释。在

相关问题 更多 >