(self, code=None)
| 17 | def __repr__(self): |
| 18 | return 'Use %s() or %s to exit' % (self.name, self.eof) |
| 19 | def __call__(self, code=None): |
| 20 | # Shells like IDLE catch the SystemExit, but listen when their |
| 21 | # stdin wrapper is closed. |
| 22 | try: |
| 23 | sys.stdin.close() |
| 24 | except: |
| 25 | pass |
| 26 | raise SystemExit(code) |
| 27 | |
| 28 | |
| 29 | class _Printer(object): |