Python getopt or argparse

I am wondering whether to use getopt or argparse when handling command-line arguments. Any suggestions?

As of 2.7, optparse (not getopt) is deprecated. argparse uses:

  • for handling positional arguments
  • supports sub-commands
  • alternative option prefixes like + and /
  • handles style arguments
  • informative usage messages- simple interface for custom types and actions

Seems to me that argparse has all the features of getopt and other stuff. argparse should be better.