]> granicus.if.org Git - python/commitdiff
Merged revisions 71540,71563 via svnmerge from
authorGeorg Brandl <georg@python.org>
Mon, 27 Apr 2009 16:41:41 +0000 (16:41 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 27 Apr 2009 16:41:41 +0000 (16:41 +0000)
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.
........

Doc/reference/compound_stmts.rst
Lib/optparse.py

index b8dd17ea3f94dd3873e2ec48712fa95503982ef0..61e3067f517d49b8ac948232ee58e4881fe1120d 100644 (file)
@@ -1,4 +1,3 @@
-
 .. _compound:
 
 *******************
index d9225e1c809f6ee218409774c1a1ac471fba608f..3eb652a6fe99eb6d6c9d977d46b19b7d99ca2fbd 100644 (file)
@@ -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"