Show sphinx display module sources

I am trying to make a cookbook from some python snippets using sphinx. Each snippet is a stand-alone Python script and has a tutorial type doctrine. I want to have a source link in the generated documentation to display the content of the script. But the viewcode doesn't seem to create this link for the module, only for the function or class with a docstring. Is there a way to coax sphinx / viewcode to display script code without any class / function in it?

+3


source to share


1 answer


I hope you haven't been sitting in two years waiting for a response, but try using the literal include tag. You can play with what is displayed.



See the sphinx docs for details .

0


source







All Articles