消息 [264096]
How about:
try:
size = os.get_terminal_size(sys.__stdout__.fileno())
except (AttributeError, ValueError, OSError):
# stdout is None, closed, detached, or not a terminal, or
# os.get_terminal_size() is unsupported
size = os.terminal_size(fallback) |
|
| 日期 |
用户 |
动作 |
参数 |
| 2016-04-24 06:22:13 | martin.panter | 修改 | recipients:
+ martin.panter, vstinner, python-dev, serhiy.storchaka, abarry |
| 2016-04-24 06:22:13 | martin.panter | 修改 | messageid: <1461478933.6.0.447080142935.issue26801@psf.upfronthosting.co.za> |
| 2016-04-24 06:22:13 | martin.panter | 链接 | issue26801 messages |
| 2016-04-24 06:22:13 | martin.panter | 创建 | |
|