我正在考虑使用 epydoc 作为一个模块的文档。它对我来说看起来不错,并且在生成 html 文档时工作正常。
我想尝试生成pdf格式的文档。我刚刚修改了配置文件中的“输出”设置。
不幸的是,epydoc 在生成 pdf 文件时失败。错误是“错误:读取 pstat 文件时出错:[Errno 2] 没有这样的文件或目录:'profile.out'”
它生成一些 tex 文件。我想也许我缺少 latex ,但我对 tex 和 latex 不是很熟悉。而且我正在 Windows 上工作。
制作 epydoc 生成 pdf 文件的下一步应该是什么?
预先感谢您的帮助
最佳答案
我想您使用了现有的conf文件。
如果你仔细观察一下里面,你会看到一个选项pstat: profile.out
。此选项表示文件 profile.out
将用于生成调用图(请参阅 doc )。
# The name of one or more pstat files (generated by the profile
# or hotshot module). These are used to generate call graphs.
pstat: profile.out
您需要使用profile
或hotspot
模块生成此文件。例如,您可以通过以下方式运行您的模块
python -m "profile" -o profile.out mymodule.py
(也可以使用hotspot
或cProfile
,这比profile
快得多)
这应该有效(我希望如此)
关于python - 如何使用epydoc生成pdf?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1176407/