MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __init__

Method __init__

tools/python-3.11.9-amd64/Lib/cmd.py:76–96  ·  view source on GitHub ↗

Instantiate a line-oriented interpreter framework. The optional argument 'completekey' is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically

(self, completekey='tab', stdin=None, stdout=None)

Source from the content-addressed store, hash-verified

74 use_rawinput = 1
75
76 def __init__(self, completekey='tab', stdin=None, stdout=None):
77 """Instantiate a line-oriented interpreter framework.
78
79 The optional argument 'completekey' is the readline name of a
80 completion key; it defaults to the Tab key. If completekey is
81 not None and the readline module is available, command completion
82 is done automatically. The optional arguments stdin and stdout
83 specify alternate input and output file objects; if not specified,
84 sys.stdin and sys.stdout are used.
85
86 """
87 if stdin is not None:
88 self.stdin = stdin
89 else:
90 self.stdin = sys.stdin
91 if stdout is not None:
92 self.stdout = stdout
93 else:
94 self.stdout = sys.stdout
95 self.cmdqueue = []
96 self.completekey = completekey
97
98 def cmdloop(self, intro=None):
99 """Repeatedly issue a prompt, accept input, parse an initial prefix

Callers 1

_reconstructorFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected