I have an app that takes a command line argument of -l or --list. It uses the getopt module to parse the arguments, and I just noticed that for some reason, getopt is matching "--lis" or "--li" etc to "--list". (Code pasted in below)
Is this normal behavior, and if so, is there any way to avoid this? I just want it to match "--list" to "--list", not "--l" and "--li" and "--lis" etc. -Jay ###### Code chunk below ###### try: options,args = getopt.getopt(sys.argv[1:], "Rf:shvl", ["list", "full-restart=", "full-restart-all", "status-all", "help", "version"]) except getopt.GetoptError: # print help information and exit: usage() sys.exit(2) if opt in ("-l", "--list"): listServices(svcs) sys.exit() _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor