转载自:http://www.cnblogs.com/fireflow/p/4841389.html(我去..没转载功能,ctrl + c 和 ctrl + v 得来的,格式有点问题,可去原版看看) add_argument()方法的定义了如何解析一个命令行参数,每个参数都有各自独立的设置参数. 1.name or flags add_argument()必须知道参数是可选的还是必须的位置参数,第一个传递给add_arguments的参数必须是可选参数或者是位置参
class ArgumentParser(_AttributeHolder, _ActionsContainer): """Object for parsing command line strings into Python objects. Keyword Arguments: - prog -- The name of the program (default: sys.argv[0]) - usage -- A usage message (default: auto