简体   繁体   中英

Can pydoc be used to generate manpages?

I have a set of python scripts that I would like to create manpages for. They are documented with docstrings, so I can get at the documentation that way, but I would also like to have manpages.

Is there a way to use pydoc to generate *roff sources for manpages?

edit: Something like perl's pod2man for python.

pydoc is not generating manpages, just showing docs in a form of man page:

...in a style similar to the manual pages shown by the Unix man command...

You can save it by:

pydoc sys >sys-docs.txt

or with terminal "colours" (use less to render them):

PAGER="cat>sys-docs.txt" pydoc sys

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM