Reputation: 12881
Is there a way with Sphinx documentation to output a function or class body (the code itself) with the autodoc feature? I'm using autodoc to much success. In addition to the docstrings getting pulled in to the documentation I want like a link to click for each function where it will show you the source... is that possible?
This is about what most of my documentation looks like now:
.. module:`foo.mymodule`
Title
===================
.. automodule:: foo.mymodule
.. autoclass:: MyModulesClass
:members:
:undoc-members:
Upvotes: 1
Views: 856
Reputation: 1025
If this still matters: The viewcode extension can do this, but needs the development version (1.0) of Sphinx
Upvotes: 2
Reputation: 900
I don't believe so. Autodoc is only for pulling the documentation out of the source code.
Upvotes: 1