| 2156 | self.output.write('\n') |
| 2157 | |
| 2158 | def intro(self): |
| 2159 | self.output.write('''\ |
| 2160 | Welcome to Python {0}'s help utility! If this is your first time using |
| 2161 | Python, you should definitely check out the tutorial at |
| 2162 | https://docs.python.org/{0}/tutorial/. |
| 2163 | |
| 2164 | Enter the name of any module, keyword, or topic to get help on writing |
| 2165 | Python programs and using Python modules. To get a list of available |
| 2166 | modules, keywords, symbols, or topics, enter "modules", "keywords", |
| 2167 | "symbols", or "topics". |
| 2168 | |
| 2169 | Each module also comes with a one-line summary of what it does; to list |
| 2170 | the modules whose name or summary contain a given string such as "spam", |
| 2171 | enter "modules spam". |
| 2172 | |
| 2173 | To quit this help utility and return to the interpreter, |
| 2174 | enter "q" or "quit". |
| 2175 | '''.format('%d.%d' % sys.version_info[:2])) |
| 2176 | |
| 2177 | def list(self, items, columns=4, width=80): |
| 2178 | items = list(sorted(items)) |