mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
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:
parent
41162ebdad
commit
e9330e7941
8 changed files with 8326 additions and 6 deletions
|
@ -16,6 +16,7 @@ but they are available on most other systems as well. Here's an overview:
|
||||||
os.rst
|
os.rst
|
||||||
io.rst
|
io.rst
|
||||||
time.rst
|
time.rst
|
||||||
|
argparse.rst
|
||||||
optparse.rst
|
optparse.rst
|
||||||
getopt.rst
|
getopt.rst
|
||||||
logging.rst
|
logging.rst
|
||||||
|
|
1758
Doc/library/argparse.rst
Normal file
1758
Doc/library/argparse.rst
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
:mod:`getopt` --- Parser for command line options
|
:mod:`getopt` --- C-style parser for command line options
|
||||||
=================================================
|
=========================================================
|
||||||
|
|
||||||
.. module:: getopt
|
.. module:: getopt
|
||||||
:synopsis: Portable parser for command line options; support both short and long option
|
:synopsis: Portable parser for command line options; support both short and long option
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
:mod:`optparse` --- More powerful command line option parser
|
:mod:`optparse` --- Parser for command line options
|
||||||
============================================================
|
===================================================
|
||||||
|
|
||||||
.. module:: optparse
|
.. module:: optparse
|
||||||
:synopsis: More convenient, flexible, and powerful command-line parsing library.
|
:synopsis: Command-line option parsing library.
|
||||||
.. moduleauthor:: Greg Ward <gward@python.net>
|
.. moduleauthor:: Greg Ward <gward@python.net>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ three`` at the command line::
|
||||||
|
|
||||||
The :mod:`getopt` module processes *sys.argv* using the conventions of the Unix
|
The :mod:`getopt` module processes *sys.argv* using the conventions of the Unix
|
||||||
:func:`getopt` function. More powerful and flexible command line processing is
|
: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:
|
.. _tut-stderr:
|
||||||
|
|
2353
Lib/argparse.py
Normal file
2353
Lib/argparse.py
Normal file
File diff suppressed because it is too large
Load diff
4206
Lib/test/test_argparse.py
Normal file
4206
Lib/test/test_argparse.py
Normal file
File diff suppressed because it is too large
Load diff
|
@ -83,6 +83,8 @@ Library
|
||||||
|
|
||||||
- Issue #6729: Added ctypes.c_ssize_t to represent ssize_t.
|
- 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
|
Extension Modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue