(ch: str)
| 840 | |
| 841 | |
| 842 | def _translate_ch_to_exc(ch: str) -> None: |
| 843 | if ch == "\x03": |
| 844 | raise KeyboardInterrupt() |
| 845 | |
| 846 | if ch == "\x04" and not WIN: # Unix-like, Ctrl+D |
| 847 | raise EOFError() |
| 848 | |
| 849 | if ch == "\x1a" and WIN: # Windows, Ctrl+Z |
| 850 | raise EOFError() |
| 851 | |
| 852 | |
| 853 | if sys.platform == "win32": |