| 2052 | |
| 2053 | _GoInteractive = object() |
| 2054 | def __call__(self, request=_GoInteractive): |
| 2055 | if request is not self._GoInteractive: |
| 2056 | try: |
| 2057 | self.help(request) |
| 2058 | except ImportError as err: |
| 2059 | self.output.write(f'{err}\n') |
| 2060 | else: |
| 2061 | self.intro() |
| 2062 | self.interact() |
| 2063 | self.output.write(''' |
| 2064 | You are now leaving help and returning to the Python interpreter. |
| 2065 | If you want to ask for help on a particular object directly from the |
| 2066 | interpreter, you can type "help(object)". Executing "help('string')" |
| 2067 | has the same effect as typing a particular string at the help> prompt. |
| 2068 | ''') |
| 2069 | |
| 2070 | def interact(self): |
| 2071 | self.output.write('\n') |