Home | History | Annotate | Download | only in python2.7

Lines Matching refs:shortopts

51 def getopt(args, shortopts, longopts = []):
56 running program. Typically, this means "sys.argv[1:]". shortopts
90 opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
94 def gnu_getopt(args, shortopts, longopts = []):
117 if shortopts.startswith('+'):
118 shortopts = shortopts[1:]
133 opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
187 def do_shorts(opts, optstring, shortopts, args):
190 if short_has_arg(opt, shortopts):
202 def short_has_arg(opt, shortopts):
203 for i in range(len(shortopts)):
204 if opt == shortopts[i] != ':':
205 return shortopts.startswith(':', i+1)