API Overview — Pexpect 4.8 documentation
pexpect.readthedocs.io › en › stablePexpect can be used on Windows to wait for a pattern to be produced by a child process, using pexpect.popen_spawn.PopenSpawn, or a file descriptor, using pexpect.fdpexpect.fdspawn. pexpect.spawn and pexpect.run() are not available on Windows, as they rely on Unix pseudoterminals (ptys). Cross platform code must not use these.
pexpect · PyPI
https://pypi.org/project/pexpect21.01.2020 · Pexpect is in the spirit of Don Libes’ Expect, but Pexpect is pure Python. The main features of Pexpect require the pty module in the Python standard library, which is only available on Unix-like systems. Some features—waiting for patterns from file descriptors or subprocesses—are also available on Windows.