optparse is a more convenient, flexible, and powerful library for parsing command-line options than the old getopt ...
docs.python.org