2

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:

2 Answers 2

2

If this still matters: The viewcode extension can do this, but needs the development version (1.0) of Sphinx

Sign up to request clarification or add additional context in comments.

Comments

1

I don't believe so. Autodoc is only for pulling the documentation out of the source code.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.