summaryrefslogtreecommitdiffstats
path: root/Lib/optparse.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-28 18:16:02 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-28 18:16:02 (GMT)
commit537caa2a0dba5f101b95319b0a273a9773ab613e (patch)
tree2b625de296fd20d9e0a6b6c62fcb33b6d8371302 /Lib/optparse.py
parent508290fea622e5cc360a3457d1f11d63aaad6336 (diff)
downloadcpython-537caa2a0dba5f101b95319b0a273a9773ab613e.zip
cpython-537caa2a0dba5f101b95319b0a273a9773ab613e.tar.gz
cpython-537caa2a0dba5f101b95319b0a273a9773ab613e.tar.bz2
Merged revisions 71540,71544,71546,71563,71572,71607,71653 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. ........ r71544 | benjamin.peterson | 2009-04-13 01:19:56 +0200 (Mo, 13 Apr 2009) | 1 line fix extra parenthesis #5774 ........ r71546 | benjamin.peterson | 2009-04-13 01:44:15 +0200 (Mo, 13 Apr 2009) | 1 line fix missing quote ........ r71563 | georg.brandl | 2009-04-13 14:36:18 +0200 (Mo, 13 Apr 2009) | 1 line Simplify markup. ........ r71572 | georg.brandl | 2009-04-13 15:13:25 +0200 (Mo, 13 Apr 2009) | 1 line #5745: more linking for identifiers in email docs. ........ r71607 | benjamin.peterson | 2009-04-14 23:23:09 +0200 (Di, 14 Apr 2009) | 1 line tupel -> tuple ........ r71653 | raymond.hettinger | 2009-04-16 20:16:10 +0200 (Do, 16 Apr 2009) | 1 line Clarify the behavior of any() and all() with an empty iterable. ........
Diffstat (limited to 'Lib/optparse.py')
-rw-r--r--Lib/optparse.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/optparse.py b/Lib/optparse.py
index 4a74a68..53bdef0 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"