[issue14841] os.get_terminal_size() should check stdin as a fallback

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Thu May 17 19:21:14 CEST 2012


New submission from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>:

$ stty size | cat
46 157
$ python3.3 -c 'import os; print(os.get_terminal_size())' | cat
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument

Redirection to `less` are often used.

A proposed patch was attached by Victor Stinner in issue #13609.

----------
messages: 160988
nosy: Arfrever, denilsonsa, haypo, zbysz
priority: normal
severity: normal
status: open
title: os.get_terminal_size() should check stdin as a fallback
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14841>
_______________________________________


More information about the Python-bugs-list mailing list