argparse.ArgumentParser.parse_args()

ArgumentParser.parse_args(args=None, namespace=None)

Convert argument strings to objects and assign them as attributes of the namespace. Return the populated namespace.

Previous calls to add_argument() determine exactly what objects are created and how they are assigned. See the documentation for add_argument() for details.

By default, the argument strings are taken from sys.argv, and a new empty Namespace object is created for the attributes.

doc_python
2016-10-07 17:26:12
Comments
Leave a Comment

Please login to continue.