如何在python中解析restructuredtext? [英] How to parse restructuredtext in python?

查看:115
本文介绍了如何在python中解析restructuredtext?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何模块可以将重组文本解析为树模型?

Is there any module that can parse restructuredtext into a tree model?

docutils或狮身人面像可以这样做吗?

Can docutils or sphinx do this?

推荐答案

Docutils 确实包含用于执行此操作的工具.

Docutils does indeed contain the tools to do this.

您可能想要的是位于docutils.parsers.rst

有关什么是详细信息,请参见此页面.涉及.在 docutils/examples.py -特别要检查internals()函数,这可能很有趣.

See this page for details on what is involved. There are also some examples at docutils/examples.py - particularly check out the internals() function, which is probably of interest.

这篇关于如何在python中解析restructuredtext?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆