PEP 389: The argparse Module for Parsing Command Lines¶. The argparse module for parsing command-line arguments was added as a more powerful replacement for the optparse module.. This means Python now supports three different modules for parsing command-line arguments: getopt, optparse, and argparse.The getopt module closely resembles the C library’s getopt() function, so it remains useful ...