[issue42402] Termios module documentation is extremely lacking
New submission from Dan Merillat <dan.merillat@gmail.com>: "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[3] = new[3] & ~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 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42402> _______________________________________
Dan Merillat <dan.merillat@gmail.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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42402> _______________________________________
Irit Katriel <iritkatriel@yahoo.com> added the comment: Could it simply be that the link to mod:`termios` should have been to :manpage:`termios(3)` instead? ---------- nosy: +iritkatriel _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42402> _______________________________________
participants (2)
-
Dan Merillat
-
Irit Katriel