Index: Doc/library/optparse.rst =================================================================== --- Doc/library/optparse.rst (revision 77235) +++ Doc/library/optparse.rst (working copy) @@ -51,8 +51,10 @@ -h --help -and :mod:`optparse` will print out a brief summary of your script's options:: +and :mod:`optparse` will print out a brief summary of your script's options: +.. code-block:: text + usage: [options] options: @@ -476,8 +478,10 @@ If :mod:`optparse` encounters either ``"-h"`` or ``"--help"`` on the command-line, or if you just call :meth:`parser.print_help`, it prints the -following to standard output:: +following to standard output: +.. code-block:: text + usage: [options] arg1 arg2 options: @@ -549,8 +553,10 @@ group.add_option("-g", action="store_true", help="Group option.") parser.add_option_group(group) -This would result in the following help output:: +This would result in the following help output: +.. code-block:: text + usage: [options] arg1 arg2 options: @@ -1126,8 +1132,10 @@ If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it will print something like the following help message to stdout (assuming - ``sys.argv[0]`` is ``"foo.py"``):: + ``sys.argv[0]`` is ``"foo.py"``): + .. code-block:: text + usage: foo.py [options] options: