Built-in Module termios

termios PosixI/O control ttyI/O control This module provides an interface to the Posix calls for tty I/O control. For a complete description of these calls, see the Posix or manual pages. It is only available for those versions that support Posix termios style tty I/O control (and then only if configured at installation time). All functions in this module take a file descriptor fd as their first argument. This must be an integer file descriptor, such as returned by sys.stdin.fileno(). This module should be used in conjunction with the TERMIOS module, which defines the relevant symbolic constants (see the next section). The module defines the following functions:
\begin{funcdesc}{tcgetattr}{fd}
Return a list containing the tty attributes for ...
...sing the symbolic constants defined in the
\code{TERMIOS} module.
\end{funcdesc}

\begin{funcdesc}{tcsetattr}{fd\, when\, attributes}
Set the tty attributes for f...
...r transmitting all
queued output and discarding all queued input.
\end{funcdesc}

\begin{funcdesc}{tcsendbreak}{fd\, duration}
Send a break on file descriptor \va...
...seconds; a nonzero \var{duration} has a system
dependent meaning.
\end{funcdesc}

\begin{funcdesc}{tcdrain}{fd}
Wait until all output written to file descriptor \var{fd} has been
transmitted.
\end{funcdesc}

\begin{funcdesc}{tcflush}{fd\, queue}
Discard queued data on file descriptor \va...
...or the output queue, or
\code{TERMIOS.TCIOFLUSH} for both queues.
\end{funcdesc}

\begin{funcdesc}{tcflow}{fd\, action}
Suspend or resume input or output on file ...
...IOFF} to
suspend input, or \code{TERMIOS.TCION} to restart input.
\end{funcdesc}


Subsections