As of python 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 (https://code.google.com/archive/p/argparse/):
+
and /
More information is also in PEP 389, which is the vehicle by which argparse
made it into the standard library.