aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/tty.py
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/tools/python3/src/Lib/tty.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'contrib/tools/python3/src/Lib/tty.py')
-rw-r--r--contrib/tools/python3/src/Lib/tty.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/contrib/tools/python3/src/Lib/tty.py b/contrib/tools/python3/src/Lib/tty.py
deleted file mode 100644
index a72eb67554..0000000000
--- a/contrib/tools/python3/src/Lib/tty.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""Terminal utilities."""
-
-# Author: Steen Lumholt.
-
-from termios import *
-
-__all__ = ["setraw", "setcbreak"]
-
-# Indexes for termios list.
-IFLAG = 0
-OFLAG = 1
-CFLAG = 2
-LFLAG = 3
-ISPEED = 4
-OSPEED = 5
-CC = 6
-
-def setraw(fd, when=TCSAFLUSH):
- """Put terminal into a raw mode."""
- mode = tcgetattr(fd)
- mode[IFLAG] = mode[IFLAG] & ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON)
- mode[OFLAG] = mode[OFLAG] & ~(OPOST)
- mode[CFLAG] = mode[CFLAG] & ~(CSIZE | PARENB)
- mode[CFLAG] = mode[CFLAG] | CS8
- mode[LFLAG] = mode[LFLAG] & ~(ECHO | ICANON | IEXTEN | ISIG)
- mode[CC][VMIN] = 1
- mode[CC][VTIME] = 0
- tcsetattr(fd, when, mode)
-
-def setcbreak(fd, when=TCSAFLUSH):
- """Put terminal into a cbreak mode."""
- mode = tcgetattr(fd)
- mode[LFLAG] = mode[LFLAG] & ~(ECHO | ICANON)
- mode[CC][VMIN] = 1
- mode[CC][VTIME] = 0
- tcsetattr(fd, when, mode)