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

Method help

tools/python-3.11.9-amd64/Lib/pydoc.py:2137–2156  ·  view source on GitHub ↗
(self, request, is_cli=False)

Source from the content-addressed store, hash-verified

2135 return self.input.readline()
2136
2137 def help(self, request, is_cli=False):
2138 if isinstance(request, str):
2139 request = request.strip()
2140 if request == 'keywords': self.listkeywords()
2141 elif request == 'symbols': self.listsymbols()
2142 elif request == 'topics': self.listtopics()
2143 elif request == 'modules': self.listmodules()
2144 elif request[:8] == 'modules ':
2145 self.listmodules(request.split()[1])
2146 elif request in self.symbols: self.showsymbol(request)
2147 elif request in ['True', 'False', 'None']:
2148 # special case these keywords since they are objects too
2149 doc(eval(request), 'Help on %s:', is_cli=is_cli)
2150 elif request in self.keywords: self.showtopic(request)
2151 elif request in self.topics: self.showtopic(request)
2152 elif request: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli)
2153 else: doc(str, 'Help on %s:', output=self._output, is_cli=is_cli)
2154 elif isinstance(request, Helper): self()
2155 else: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli)
2156 self.output.write('\n')
2157
2158 def intro(self):
2159 self.output.write('''\

Callers 3

__call__Method · 0.95
interactMethod · 0.95
cliFunction · 0.45

Calls 10

listkeywordsMethod · 0.95
listsymbolsMethod · 0.95
listtopicsMethod · 0.95
listmodulesMethod · 0.95
showsymbolMethod · 0.95
showtopicMethod · 0.95
stripMethod · 0.80
docFunction · 0.70
splitMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected