马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
LibreOffice Writer是一个开源的字处理工具,Word的替代品.Python利用odfpy库读写odt文档.
https://stackoverflow.com/questi ... ad-odt-using-python
代码:
from odf import text, teletype
from odf.opendocument import load
textdoc = load("your.odt")
allparas = textdoc.getElementsByType(text.P)
teletype.extractText(allparas[0]) |