-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fixes #2847 #2851
Fixes #2847 #2851
Conversation
Reverted the Unix changes. |
Thanks! I like the idea to avoid If we're not using The AppVeyor output points toward the tests that need some additional examination: |
Sounds reasonable. Including |
Implemented Edit: I hope I changed the tests correctly. |
I am not sure about the tests. Works but I think the behavior is different with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working out the details here! I left one comment inline about dealing with shell argument weirdness.
base_cmd = 'start' | ||
# python is not aware of cmd commands | ||
# Start cmd.exe with start as argument | ||
base_cmd = 'cmd /c \"start {}\"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the last thing we need a way around: using interpolation will cause unpredictable problems here when the filename contains special characters (including spaces). Do you know whether it's possible to get the same effect while using proper argument lists?
For example, what I would want to work would be:
subprocess.call('start', filename)
but, as you realized, that won't work because start
is a cmd shell built-in. See this SO answer, for example.
Is there any clever way we can pass the filename argument as a proper shell argument without shell interpolation? As a last resort, we may need to escape the filename ourselves. 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subprocess.call(["cmd", "/c", "start", file])
I got this working
@SuperSandro2000 do you still intend to continue this? |
@jtpavlock It was dead for 2.5 years not from my side. |
Well if you're still interested in getting it merged, it would need at the very least a relevant change log entry/docs and maybe we can get @sampsyo to give it another look over. |
@jtpavlock Replaced by #3665 |
No description provided.