【发布时间】:2016-04-19 19:28:56
【问题描述】:
Poppler 中的方法调用在我的 Python 代码中返回一个 GDate 对象。我找不到如何很好地打印这个对象的方法。
按照Python GI API Reference,我想出了以下内容:
gdate_object = annot_mapping.annot.get_date()
destination_buffer = '.' * 50
print('Output:', GLib.Date.strftime(destination_buffer, 50, '%c', gdate_object))
print('Buffer:', annot_time)
然而,这不会在缓冲区中放置任何内容,而它确实输出写入的缓冲区大小。
如何访问目标缓冲区?
【问题讨论】:
标签: python-3.x pygobject gobject-introspection