MCPcopy
hub / github.com/pallets/click / _translate_ch_to_exc

Function _translate_ch_to_exc

src/click/_termui_impl.py:842–850  ·  view source on GitHub ↗
(ch: str)

Source from the content-addressed store, hash-verified

840
841
842def _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
853if sys.platform == "win32":

Callers 1

getcharFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected