tty
index
/usr/lib/python1.5/tty.py
 

# tty.py -- Terminal utilities.
# Author: Steen Lumholt.

   
Functions
                        
tcdrain(...)
tcdrain(fd) -> None
Wait until all output written to file descriptor fd has been transmitted.
tcflow(...)
tcflow(fd, action) -> None
Suspend or resume input or output on file descriptor fd.
The action argument can be TERMIOS.TCOOFF to suspend output,
TERMIOS.TCOON to restart output, TERMIOS.TCIOFF to suspend input,
or TERMIOS.TCION to restart input.
tcflush(...)
tcflush(fd, queue) -> None
Discard queued data on file descriptor fd.
The queue selector specifies which queue: TERMIOS.TCIFLUSH for the input
queue, TERMIOS.TCOFLUSH for the output queue, or TERMIOS.TCIOFLUSH for
both queues.
tcgetattr(...)
tcgetattr(fd) -> list_of_attrs
Get the tty attributes for file descriptor fd, as follows:
[iflag, oflag, cflag, lflag, ispeed, ospeed, cc] where cc is a list
of the tty special characters (each a string of length 1, except the items
with indices VMIN and VTIME, which are integers when these fields are
defined).  The interpretation of the flags and the speeds as well as the
indexing in the cc array must be done using the symbolic constants defined
in the TERMIOS module.
tcsendbreak(...)
tcsendbreak(fd, duration) -> None
Send a break on file descriptor fd.
A zero duration sends a break for 0.25-0.5 seconds; a nonzero duration 
has a system dependent meaning.
tcsetattr(...)
tcsetattr(fd, when, attributes) -> None
Set the tty attributes for file descriptor fd.
The attributes to be set are taken from the attributes argument, which
is a list like the one returned by tcgetattr(). The when argument
determines when the attributes are changed: TERMIOS.TCSANOW to
change immediately, TERMIOS.TCSADRAIN to change after transmitting all
queued output, or TERMIOS.TCSAFLUSH to change after transmitting all
queued output and discarding all queued input.

   
Constants
                        
B0 = 0
B1000000 = 4104
B110 = 3
B115200 = 4098
B1152000 = 4105
B1200 = 9
B134 = 4
B150 = 5
B1500000 = 4106
B1800 = 10
B19200 = 14
B200 = 6
B2000000 = 4107
B230400 = 4099
B2400 = 11
B2500000 = 4108
B300 = 7
B3000000 = 4109
B3500000 = 4110
B38400 = 15
B4000000 = 4111
B460800 = 4100
B4800 = 12
B50 = 1
B500000 = 4101
B57600 = 4097
B576000 = 4102
B600 = 8
B75 = 2
B921600 = 4103
B9600 = 13
BRKINT = 2
BS0 = 0
BS1 = 8192
BSDLY = 8192
CBAUD = 4111
CBAUDEX = 4096
CBRK = 0
CC = 6
CDISCARD = 15
CDSUSP = 25
CEOF = 4
CEOL = 0
CEOT = 4
CERASE = 127
CFLAG = 2
CFLUSH = 15
CIBAUD = 269418496
CINTR = 3
CKILL = 21
CLNEXT = 22
CLOCAL = 2048
CLONE_FILES = 1024
CLONE_FS = 512
CLONE_PID = 4096
CLONE_PTRACE = 8192
CLONE_SIGHAND = 2048
CLONE_VFORK = 16384
CLONE_VM = 256
CMIN = 1
CQUIT = 28
CR0 = 0
CR1 = 512
CR2 = 1024
CR3 = 1536
CRDLY = 1536
CREAD = 128
CREPRINT = 18
CRPRNT = 18
CRTSCTS = -2147483648
CS5 = 0
CS6 = 16
CS7 = 32
CS8 = 48
CSIGNAL = 255
CSIZE = 48
CSTART = 17
CSTATUS = 0
CSTOP = 19
CSTOPB = 64
CSUSP = 26
CTIME = 0
CWERASE = 23
ECHO = 8
ECHOCTL = 512
ECHOE = 16
ECHOK = 32
ECHOKE = 2048
ECHONL = 64
ECHOPRT = 1024
EXTA = 14
EXTB = 15
FF0 = 0
FF1 = 32768
FFDLY = 32768
FLUSHO = 4096
HUPCL = 1024
ICANON = 2
ICRNL = 256
IEXTEN = 32768
IFLAG = 0
IGNBRK = 1
IGNCR = 128
IGNPAR = 4
IMAXBEL = 8192
INLCR = 64
INPCK = 16
ISIG = 1
ISPEED = 4
ISTRIP = 32
IUCLC = 512
IXANY = 2048
IXOFF = 4096
IXON = 1024
LFLAG = 3
NCCS = 32
NL0 = 0
NL1 = 256
NLDLY = 256
NOFLSH = 128
OCRNL = 8
OFDEL = 128
OFILL = 64
OFLAG = 1
OLCUC = 2
ONLCR = 4
ONLRET = 32
ONOCR = 16
OPOST = 1
OSPEED = 5
PARENB = 256
PARMRK = 8
PARODD = 512
PENDIN = 16384
SCHED_FIFO = 1
SCHED_OTHER = 0
SCHED_RR = 2
TAB0 = 0
TAB1 = 2048
TAB2 = 4096
TAB3 = 6144
TABDLY = 6144
TCIFLUSH = 0
TCIOFF = 2
TCIOFLUSH = 2
TCION = 3
TCOFLUSH = 1
TCOOFF = 0
TCOON = 1
TCSADRAIN = 1
TCSAFLUSH = 2
TCSANOW = 0
TOSTOP = 256
TTYDEF_CFLAG = 1440
TTYDEF_IFLAG = 11554
TTYDEF_LFLAG = 35355
TTYDEF_OFLAG = 6149
TTYDEF_SPEED = 13
VDISCARD = 13
VEOF = 4
VEOL = 11
VEOL2 = 16
VERASE = 2
VINTR = 0
VKILL = 3
VLNEXT = 15
VMIN = 6
VQUIT = 1
VREPRINT = 12
VSTART = 8
VSTOP = 9
VSUSP = 10
VSWTC = 7
VT0 = 0
VT1 = 16384
VTDLY = 16384
VTIME = 5
VWERASE = 14
XCASE = 4
XTABS = 6144