如何使用epydoc生成pdf?

时间:2022-05-24 00:29:34

I am considering epydoc for the documentation of one module. It looks ok to me and is working fine when I am generating html document.

我正在考虑将epydoc用于一个模块的文档。它对我来说没问题,并且在生成html文档时工作正常。

I would like to try to generate the documenation in the pdf format. I've just modified the 'output' setting in my config file.

我想尝试以pdf格式生成文档。我刚修改了配置文件中的'output'设置。

Unfortunately, epydoc fails when generating the pdf file. The error is "Error: Error reading pstat file: [Errno 2] No such file or directory: 'profile.out'"

不幸的是,生成pdf文件时epydoc失败了。错误是“错误:读取pstat文件时出错:[Errno 2]没有这样的文件或目录:'profile.out'”

it generates some tex files. I think that maybe I am missing latex but I am not very familliar with tex and latex. More over I am working on Windows.

它会生成一些tex文件。我想也许我错过了乳胶,但我不熟悉tex和乳胶。更多我在Windows上工作。

What should be the next steps for making epydoc generating pdf file?

制作epydoc生成pdf文件的下一步应该是什么?

Thanks in advance for your help

在此先感谢您的帮助

1 个解决方案

#1


I suppose that you used an existing conf file.

我想你使用了现有的conf文件。

If you have a closer look inside, you will see an option pstat: profile.out. This options says that the file profile.out will be used to generate the call graph (see doc).

如果你仔细看看里面,你会看到一个选项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

You need to generate this file, by using the profileor hotspotmodule. For example, you can run your module by

您需要使用profileor hotspotmodule生成此文件。例如,您可以运行您的模块

python -m "profile" -o profile.out mymodule.py

(it is also possible to use hotspot or cProfile, that is much much faster than profile)

(也可以使用热点或cProfile,这比配置文件快得多)

This should works (I hope so)

这应该有效(我希望如此)

#1


I suppose that you used an existing conf file.

我想你使用了现有的conf文件。

If you have a closer look inside, you will see an option pstat: profile.out. This options says that the file profile.out will be used to generate the call graph (see doc).

如果你仔细看看里面,你会看到一个选项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

You need to generate this file, by using the profileor hotspotmodule. For example, you can run your module by

您需要使用profileor hotspotmodule生成此文件。例如,您可以运行您的模块

python -m "profile" -o profile.out mymodule.py

(it is also possible to use hotspot or cProfile, that is much much faster than profile)

(也可以使用热点或cProfile,这比配置文件快得多)

This should works (I hope so)

这应该有效(我希望如此)