Skip to content

Add Windows support#9

Open
leiflm wants to merge 3 commits into
highwall:masterfrom
KLSMartin:feature/use_fdspawn_on_windows
Open

Add Windows support#9
leiflm wants to merge 3 commits into
highwall:masterfrom
KLSMartin:feature/use_fdspawn_on_windows

Conversation

@leiflm
Copy link
Copy Markdown

@leiflm leiflm commented May 18, 2021

This change adds Windows support by using a drop-in class replacement for pexpect.spawn, introduced by pexpect 4.0.

Leif Middelschulte added 2 commits May 18, 2021 10:15
According to upstream documentation[0] Windows(TM) is not supported automatically.
But one can use a drop-in replacement for `pexpect.spawn` in the case of fd based approaches.
According to upstream documentation[0], at least version 4.0
is required for Windows support.

[0] https://pexpect.readthedocs.io/en/stable/overview.html#pexpect-on-windows
Comment on lines +26 to +27
import os
if os.name in ['nt']:
Copy link
Copy Markdown
Author

@leiflm leiflm May 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT this condition is not even necessary. Using pexpect.fdexpect.fdspawn should be the right choice on any operating system.

To keep it "as is" as much as possible though, I've added this if/else conditional import statement here. Feel free to remove it and go solely with pexpect.fdexpect.fdspawn.

Windows support has been added.

As this change is backwards compatible, bump only minor version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant