Sphinx でプロジェクトのドキュメントを作成しようとしていますが、Sphinx がモジュールで OptionParser に遭遇するたびに、次のようになります。
sphinx-build: エラー: そのようなオプションはありません: -b
私はそれは不可能だと思ったので、これをチェックするための簡単なモジュールを書きました:
from optparse import OptionParser
"""some comment here"""
parser = OptionParser(conflict_handler='resolve')
parser.add_option('', '--force', action='store_true', dest='force', default=False, help='gqdel will skip asking questions, and delete them all.');
parser.add_option('', '--verbose', action='store_true', dest='verbose', default=False, help='Report additional information from gqdel')
(options, args) = parser.parse_args()
"""and here"""
print "foo"
そして、それは私に同じエラーを与えます。私の最初は次のようになります:
some title
==========
.. automodule:: test
:members: