3

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.

roelvanmeer
  • 356
  • 4
  • 18

1 Answers1

0

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
jhutar
  • 1,369
  • 2
  • 17
  • 32