This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Pexpect : setwinsize() not working in SLES 12.4 kernel 4.12.14-94.41-default
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: archi-pandey, xtreak
Priority: normal Keywords:

Created on 2020-01-21 07:01 by archi-pandey, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg360356 - (view) Author: Archana Pandey (archi-pandey) Date: 2020-01-21 07:01
use of setwinsize function returns empty if the values of rows and cols differes from(24,80).
Issue occurs only on SLES 12.4.

sample code:
#!/usr/bin/env python
from pexpect import pxssh
try:
    s = pxssh.pxssh()
    hostname = 'someIp'
    username = 'username'
    password = 'password'
    s.login(hostname, username, password)
    s.setwinsize(1000,1000)  # setting default winsize works
    s.sendline('uname -r')   # run a command
    s.prompt()             # match the prompt
    print(s.before)        # print everything before the prompt.
    s.logout()
except pxssh.ExceptionPxssh as e:
    print("pxssh failed on login.")
    print(e)
msg360358 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-01-21 07:46
The tracker is for issues related to CPython. Can you please add a reproducer without pexpect or other dependencies explaining the issue with Python? https://github.com/pexpect/pexpect/issues is the issue tracker for pexpect.
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83585
2020-01-21 10:00:05archi-pandeysetstatus: open -> closed
resolution: third party
stage: resolved
2020-01-21 07:46:19xtreaksetnosy: + xtreak
messages: + msg360358
2020-01-21 07:01:51archi-pandeycreate