【发布时间】:2013-09-14 12:21:45
【问题描述】:
我想用 Sphinx 和重组文本写一本书。作为大部分内容 将是用Python编写的解决方案我想将文本和代码分开。
是否有将外部 python 脚本添加到我的重组文本文档的命令?
我尝试使用
.. code-block:: python
.. include:: unittest_exp1.py
和
.. code-block:: python
.. file:: unittest_exp1.py
【问题讨论】:
标签: python python-sphinx restructuredtext