()
| 117 | keyboard_interrupt = False |
| 118 | |
| 119 | def in_thread(): |
| 120 | nonlocal line, keyboard_interrupt |
| 121 | try: |
| 122 | line = self.pt_app.prompt() |
| 123 | except EOFError: |
| 124 | line = 'EOF' |
| 125 | except KeyboardInterrupt: |
| 126 | keyboard_interrupt = True |
| 127 | |
| 128 | th = threading.Thread(target=in_thread) |
| 129 | th.start() |