New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't split cmd strings on win32 in PopenSpawn #447

Merged
merged 1 commit into from Sep 28, 2017

Conversation

Projects
None yet
3 participants
@robholt
Contributor

robholt commented Sep 27, 2017

On win32 Popen uses strings for args, so in PopenSpawn it isn't necessary to convert a string to a list just for Popen to convert it back again.
This also resolves an issue I was having where if the path to the executable was double quoted those quotes would stay in the first element of the cmd list and would cause Popen to throw a FileNotFoundError.

Don't split cmd strings on win32
On win32 Popen uses strings for args, so don't convert cmd to a list if running on win32.
See: https://docs.python.org/3/library/subprocess.html#converting-argument-sequence
@takluyver

This comment has been minimized.

Member

takluyver commented Sep 28, 2017

Seems reasonable, thanks.

@takluyver takluyver merged commit 6d0b6d0 into pexpect:master Sep 28, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 88.76%
Details
@blink1073

This comment has been minimized.

Contributor

blink1073 commented Oct 24, 2017

@takluyver, can I pester you for a patch release with this?

@blink1073

This comment has been minimized.

Contributor

blink1073 commented Oct 24, 2017

It turns out I need to split the command either way for my use case. Consider yourself un-pestered ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment