getopt:
The getopt module is the old-school command line option parser that supports the conventions established by the Unix functiongetopt(). It parses an argument sequence, such as sys.argv and returns a sequence of (option, argument) pairs and a sequence of non-option arguments.