| 2005 | |
| 2006 | _GoInteractive = object() |
| 2007 | def __call__(self, request=_GoInteractive): |
| 2008 | if request is not self._GoInteractive: |
| 2009 | try: |
| 2010 | self.help(request) |
| 2011 | except ImportError as err: |
| 2012 | self.output.write(f'{err}\n') |
| 2013 | else: |
| 2014 | self.intro() |
| 2015 | self.interact() |
| 2016 | self.output.write(''' |
| 2017 | You are now leaving help and returning to the Python interpreter. |
| 2018 | If you want to ask for help on a particular object directly from the |
| 2019 | interpreter, you can type "help(object)". Executing "help('string')" |
| 2020 | has the same effect as typing a particular string at the help> prompt. |
| 2021 | ''') |
| 2022 | |
| 2023 | def interact(self): |
| 2024 | self.output.write('\n') |