Initial commit of the argparse library, based on argparse 1.1.

Docs still need some updating to make getopt and optparse match the wording promised in the PEP.
There are also probably a number of :class:ArgumentParser etc. links that could be added to the argparse documentation.
This commit is contained in:
Steven Bethard 2010-03-02 08:38:09 +00:00
parent 41162ebdad
commit e9330e7941
8 changed files with 8326 additions and 6 deletions

View File

@ -16,6 +16,7 @@ but they are available on most other systems as well. Here's an overview:
os.rst
io.rst
time.rst
argparse.rst
optparse.rst
getopt.rst
logging.rst

1758
Doc/library/argparse.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
:mod:`getopt` --- Parser for command line options
=================================================
:mod:`getopt` --- C-style parser for command line options
=========================================================
.. module:: getopt
:synopsis: Portable parser for command line options; support both short and long option

View File

@ -1,8 +1,8 @@
:mod:`optparse` --- More powerful command line option parser
============================================================
:mod:`optparse` --- Parser for command line options
===================================================
.. module:: optparse
:synopsis: More convenient, flexible, and powerful command-line parsing library.
:synopsis: Command-line option parsing library.
.. moduleauthor:: Greg Ward <gward@python.net>

View File

@ -72,7 +72,7 @@ three`` at the command line::
The :mod:`getopt` module processes *sys.argv* using the conventions of the Unix
:func:`getopt` function. More powerful and flexible command line processing is
provided by the :mod:`optparse` module.
provided by the :mod:`argparse` module.
.. _tut-stderr:

2353
Lib/argparse.py Normal file

File diff suppressed because it is too large Load Diff

4206
Lib/test/test_argparse.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -83,6 +83,8 @@ Library
- Issue #6729: Added ctypes.c_ssize_t to represent ssize_t.
- Issue #6247: The argparse module has been added to the standard library.
Extension Modules
-----------------