| control interfaces. |
| |
| The module defines the following functions: |
| |
| |
| .. function:: tcgetattr(fd) |
| |
| Return a list containing the tty attributes for file descriptor *fd*, as |
n | follows: ``[``*iflag*, *oflag*, *cflag*, *lflag*, *ispeed*, *ospeed*, *cc*``]`` |
n | follows: ``[iflag, oflag, cflag, lflag, ispeed, ospeed, cc]`` where *cc* is a |
| where *cc* is a list of the tty special characters (each a string of length 1, |
| list of the tty special characters (each a string of length 1, except the |
| except the items with indices :const:`VMIN` and :const:`VTIME`, which are |
| items with indices :const:`VMIN` and :const:`VTIME`, which are integers when |
| integers when these fields are defined). The interpretation of the flags and |
| these fields are defined). The interpretation of the flags and the speeds as |
| the speeds as well as the indexing in the *cc* array must be done using the |
| well as the indexing in the *cc* array must be done using the symbolic |
| symbolic constants defined in the :mod:`termios` module. |
| constants defined in the :mod:`termios` module. |
| |
| |
| .. function:: tcsetattr(fd, when, attributes) |
| |
| Set the tty attributes for file descriptor *fd* from the *attributes*, which is |
| a list like the one returned by :func:`tcgetattr`. The *when* argument |
| determines when the attributes are changed: :const:`TCSANOW` to change |
| immediately, :const:`TCSADRAIN` to change after transmitting all queued output, |