Skip to content

wexpect.spawn(echo=False) is not work and setecho(False) is raise the "AttributeError: 'SpawnPipe' object has no attribute 'setecho'" exception. #64

@nhtha

Description

@nhtha

Dear experts,
I'm starting to use wexpect to interact with putty's plink.exe. but I'm facing the following issue with echo:

Describe the bug
wexpect.spawn(echo=False) is not work and setecho(False) is raise the "AttributeError: 'SpawnPipe' object has no attribute 'setecho'" exception.

To Reproduce
Steps to reproduce the behavior:
ssh = wexpect.spawn(command='plink.exe', timeout=60, maxread=99999, echo=False)
ssh.setecho(False)

Expected behavior
Texts were sent by sendline() are not include in the ssh.before.

Screenshots
image

Environment:

  • [windows version] Windows 11 Pro for Workstation 23H2
  • [Python version] 3.10.8
  • [wexpect version] 4.0
  • [putty plink version] Release 0.80

Please help me to identify and solve this issue.
Best regards,
Ha Nguyen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions