New submission from Dan Merillat firstname.lastname@example.org:
"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." (termios links to itself)
These constants are not listed in the documentation and the termios module is installed as a shared library so you can't read it without going to the source.
Furthermore the example in the documentation uses the following example:
new = termios.tcgetattr(fd) new = new & ~termios.ECHO # lflags
Which is explicitly against the documentation on the same page. This has led to most searches on the net turning up people using magic numbers in places instead of symbolic values.
Inserting a list of constants with an extremely brief description would improve the module documentation dramatically.
---------- assignee: docs@python components: Documentation messages: 381393 nosy: dan.merillat, docs@python priority: normal severity: normal status: open title: Termios module documentation is extremely lacking versions: Python 3.9
Dan Merillat email@example.com added the comment:
Correction, the example source in the documentation is correct as there's no symbolic names for the tty attributes array, only the cc field.
Irit Katriel firstname.lastname@example.org added the comment:
Could it simply be that the link to mod:`termios` should have been to :manpage:`termios(3)` instead?
---------- nosy: +iritkatriel