February 2006
Intermediate to advanced
648 pages
14h 53m
English
The termios module provides a POSIX-style interface for controlling the behavior of TTYs and other serial communication devices on UNIX systems. All the functions operate on integer file descriptors such as those returned by the os.open() function or the fileno() method of a file object. In addition, the module relies on a large collection of constants that are also defined in this module.
tcgetattr(fd)Returns a list [iflag, oflag, cflag, lflag, ispeed, ospeed, cc] of TTY attributes for a file descriptor, fd. The meaning of these fields is as follows:
| Field | Description |
|---|---|
| iflag | Input modes (integer) |
| oflag | Output modes (integer) |
| cflag | Control modes (integer) |
| lflag | Local modes (integer) |
| ispeed | Input speed (integer) |
| ospeed | Output speed (integer) |
| cc | A list ... |
Read now
Unlock full access