Frequently-asked questionsΒΆ
- Is there, or will there be, support for
optparse
? - Because
optparse
was deprecated in Python 2.7, we have no plans to support it at present. If you’d still like to usesphinxcontrib.argdoc
, see the Python documentation on upgrading optparse code. - My main-like function is not named main. Can I use
sphinxcontrib.argdoc
without changing the function name? - Absolutely. Just set argdoc_main_func to the name of your function
(as a string) in
conf.py
. See Processing a main-like function named something other than main for instructions. - My executable scripts use alternate prefix characters.
- Can
sphinxcontrib.argdoc
handle these? Yes. See Using alternate prefix characters in your ArgumentParser for details. - Does
sphinxcontrib.argdoc
support subcommands? - Yes. You don’t need to do anything special.
sphinxcontrib.argdoc
will find these all by itself. - Does
sphinxcontrib.argdoc
support nested subcommands? - Yes. See the Examples.