Lines Matching refs:getopt
1 :mod:`getopt` --- C-style parser for command line options
4 .. module:: getopt
8 **Source code:** :source:`Lib/getopt.py`
12 The :mod:`getopt` module is a parser for command line options whose API is
13 designed to be familiar to users of the C :c:func:`getopt` function. Users who
14 are unfamiliar with the C :c:func:`getopt` function or who would like to write
21 It supports the same conventions as the Unix :c:func:`getopt` function (including
30 .. function:: getopt(args, shortopts, longopts=[])
36 colon (``':'``; i.e., the same format that Unix :c:func:`getopt` uses).
40 Unlike GNU :c:func:`getopt`, after a non-option argument, all further
68 This function works like :func:`getopt`, except that GNU style scanning mode is
70 intermixed. The :func:`getopt` function stops processing options as soon as a
95 >>> import getopt
99 >>> optlist, args = getopt.getopt(args, 'abc:d:')
111 >>> optlist, args = getopt.getopt(args, 'x', [
120 import getopt, sys
124 opts, args = getopt.getopt(sys.argv[1:], "ho:v", ["help", "output="])
125 except getopt.GetoptError as err: