HACKER Q&A
📣 RPeres

How do people generate documentation from Python comments?


We are in the process of improving our documentation for our users. I am not experienced at all in the Python ecosystem, so I would like to get some idea/suggestions on how people are generating docs from python comments. The idea is to then put the output on a website, so people can access publicly.


  👤 jjgreen Accepted Answer ✓
It used to be that Sphinx [1] was the go-to solution, possibly something else has emerged since I was doing this sort of thing. Some example output at [2]

[1] https://www.sphinx-doc.org/en/master/

[2] http://soliton.vm.bytemark.co.uk/pub/docs/mvpoly/


👤 PaulHoule
docutils is a lower-level system than Sphinx

https://docutils.sourceforge.io/

Note also that the "help()" function

https://docs.python.org/3/library/functions.html#help

reads out these comments and prints them on the interactive console.