[Python-checkins] r72024 - in python/branches/py3k: Doc/reference/compound_stmts.rst Lib/optparse.py
georg.brandl
python-checkins at python.org
Mon Apr 27 18:41:41 CEST 2009
Author: georg.brandl
Date: Mon Apr 27 18:41:41 2009
New Revision: 72024
Log:
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.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/reference/compound_stmts.rst
python/branches/py3k/Lib/optparse.py
Modified: python/branches/py3k/Doc/reference/compound_stmts.rst
==============================================================================
--- python/branches/py3k/Doc/reference/compound_stmts.rst (original)
+++ python/branches/py3k/Doc/reference/compound_stmts.rst Mon Apr 27 18:41:41 2009
@@ -1,4 +1,3 @@
-
.. _compound:
*******************
Modified: python/branches/py3k/Lib/optparse.py
==============================================================================
--- python/branches/py3k/Lib/optparse.py (original)
+++ python/branches/py3k/Lib/optparse.py Mon Apr 27 18:41:41 2009
@@ -6,6 +6,19 @@
For support, use the optik-users at 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"
More information about the Python-checkins
mailing list