0

我对 python-docx 库有疑问。我正在关注此页面的示例,但它似乎不起作用。任何人都可以提供一些帮助吗?

>>> all_runs[0]
<docx.text.Run object at 0x7f49b899c5d0>
>>> play=all_runs[0]
>>> play.add_break(WD_BREAK.PAGE)
>>> play.breaks
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Run' object has no attribute 'breaks'
4

1 回答 1

1

该页面是设计文档的一部分,而不是竣工文档(请注意标题“候选”协议)。目前还没有breaks实现任何属性Run

如果你能谈谈你想要完成的事情,我可能会提供帮助。

于 2014-05-31T05:32:17.030 回答