getopt.getopt(args, shortopts, longopts=[])
Parses command line options and parameter list. args is the argument list to be parsed, without the leading reference to the running program. Typically, this means sys.argv[1:]. shortopts is the string of option letters that the script wants to recognize, with options that require an argument followed by a colon (':'; i.e., the same format that Unix getopt() uses).
Note Unlike GNU getopt(), after a non-option argument, all further arguments are co