<s>[INST] Why use argparse rather than optparse? I noticed that the Python 2.7 documentation includes yet another command-line parsing module.  In addition to getopt and optparse we now have argparse.
Why has yet another command-line parsing module been created?  Why should I use it instead of optparse?  Are there new features that I should know about?
 [/INST] As of 2.7, optparse is deprecated, and will hopefully go away in the future.
argparse is better for all the reasons listed on its original page (http://code.google.com/p/argparse/):

handling positional arguments
supporting sub-commands
allowing alternative option prefixes like + and /
handling zero-or-more and one-or-more style arguments
producing more informative usage messages
providing a much simpler interface for custom types and actions

More information is also in PEP 389, which is the vehicle by which argparse made it into the standard library.
 </s>