[New-bugs-announce] [issue41541] Make pty.spawn set window size, make code more readable

Soumendra Ganguly report at bugs.python.org
Thu Aug 13 13:37:00 EDT 2020


New submission from Soumendra Ganguly <soumendra at tamu.edu>:

The example in https://docs.python.org/3/library/pty.html that mimics script(1) can be used to reproduce the problem: since window size is not set by pty.spawn, output of "ls" becomes scattered and hard to visually parse if xterm window is not in fullscreen mode.

To fix the above issue, this patch makes pty.spawn set window size ( TIOCSWINSZ ). Also, this patch makes the code of pty.fork() more readable by defining _login_pty(); the latter is reused in spawn().

----------
components: Library (Lib)
files: pty.diff
keywords: patch
messages: 375326
nosy: soumendra
priority: normal
severity: normal
status: open
title: Make pty.spawn set window size, make code more readable
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49386/pty.diff

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41541>
_______________________________________


More information about the New-bugs-announce mailing list