Apologies - this is a complete n00b question:
I have a couple of python scripts with no .py extension.
How do I convince Sphinx that it should document that script? Example error:
/home/XXX/YYYYY/development/dst/build/index.rst:25: (WARNING/2) autodoc can't import/find module 'site_scons.random', it reported error: "No module named random", please check your spelling and sys.path
In order for your script to be a module, it needs to include the .py
suffix. From the Python docs:
A module is a file containing Python definitions and statements. The file name is the module name with the suffix
.py
appended.
Without giving it the suffix, Sphinx won't be able to import it to generate documentation using automodule
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With