| 1824 | |
| 1825 | |
| 1826 | def _introdoc(): |
| 1827 | import textwrap |
| 1828 | ver = '%d.%d' % sys.version_info[:2] |
| 1829 | if os.environ.get('PYTHON_BASIC_REPL'): |
| 1830 | pyrepl_keys = '' |
| 1831 | else: |
| 1832 | # Additional help for keyboard shortcuts if enhanced REPL is used. |
| 1833 | pyrepl_keys = ''' |
| 1834 | You can use the following keyboard shortcuts at the main interpreter prompt. |
| 1835 | F1: enter interactive help, F2: enter history browsing mode, F3: enter paste |
| 1836 | mode (press again to exit). |
| 1837 | ''' |
| 1838 | return textwrap.dedent(f'''\ |
| 1839 | Welcome to Python {ver}'s help utility! If this is your first time using |
| 1840 | Python, you should definitely check out the tutorial at |
| 1841 | https://docs.python.org/{ver}/tutorial/. |
| 1842 | |
| 1843 | Enter the name of any module, keyword, or topic to get help on writing |
| 1844 | Python programs and using Python modules. To get a list of available |
| 1845 | modules, keywords, symbols, or topics, enter "modules", "keywords", |
| 1846 | "symbols", or "topics". |
| 1847 | {pyrepl_keys} |
| 1848 | Each module also comes with a one-line summary of what it does; to list |
| 1849 | the modules whose name or summary contain a given string such as "spam", |
| 1850 | enter "modules spam". |
| 1851 | |
| 1852 | To quit this help utility and return to the interpreter, |
| 1853 | enter "q", "quit" or "exit". |
| 1854 | ''') |
| 1855 | |
| 1856 | class Helper: |
| 1857 | |