summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-27 16:41:41 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-27 16:41:41 (GMT)
commitf3532df236481cebd458a35b82d803a4af750c1c (patch)
tree6dd8c7921e833c7d2f3905a8ebdc7579fc1f7b99
parent3db16bb4306a70ea06933ae92e2e18263dad845d (diff)
downloadcpython-f3532df236481cebd458a35b82d803a4af750c1c.zip
cpython-f3532df236481cebd458a35b82d803a4af750c1c.tar.gz
cpython-f3532df236481cebd458a35b82d803a4af750c1c.tar.bz2
Merged revisions 71540,71563 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71540 | georg.brandl | 2009-04-12 22:30:53 +0200 (So, 12 Apr 2009) | 1 line #5719: add short usage example to optparse docstring. ........ r71563 | georg.brandl | 2009-04-13 14:36:18 +0200 (Mo, 13 Apr 2009) | 1 line Simplify markup. ........
-rw-r--r--Doc/reference/compound_stmts.rst1
-rw-r--r--Lib/optparse.py13
2 files changed, 13 insertions, 1 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index b8dd17e..61e3067 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -1,4 +1,3 @@
-
.. _compound:
*******************
diff --git a/Lib/optparse.py b/Lib/optparse.py
index d9225e1..3eb652a 100644
--- a/Lib/optparse.py
+++ b/Lib/optparse.py
@@ -6,6 +6,19 @@ Originally distributed as Optik.
For support, use the optik-users@lists.sourceforge.net mailing list
(http://lists.sourceforge.net/lists/listinfo/optik-users).
+
+Simple usage example:
+
+ from optparse import OptionParser
+
+ parser = OptionParser()
+ parser.add_option("-f", "--file", dest="filename",
+ help="write report to FILE", metavar="FILE")
+ parser.add_option("-q", "--quiet",
+ action="store_false", dest="verbose", default=True,
+ help="don't print status messages to stdout")
+
+ (options, args) = parser.parse_args()
"""
__version__ = "1.5.3"