Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Windows command line does not support single quotes.#91856
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
System version: Windows 10 21H2Python version: Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32At the command-line terminal (cmd or Powershell) you have to use double quotes to enclose the argument you wish to send. Enclose it with double quotes, and use single quotes within it. (https://stackoverflow.com/a/34379661/11687405)For details, please refer to the GIF:
ghost commentedApr 23, 2022 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
The following commit authors need to sign the Contributor License Agreement: |
fatihkabakk commentedApr 23, 2022
Yes, you're correct. However, powershell does not require double quotes. Powershell is like a simulation of |
JelleZijlstra commentedApr 30, 2022
On Unix, single quotes are better because double quotes may do variable substitution. I'm not familiar enough with Windows to opine on what quotes are better there. |
zooba commentedMay 2, 2022
Maybe just say "single or double quotes"? This is a hint for people who are both new to terminals and new to Python, but it isn't really our responsibility to go too deep into how to use every single terminal in the world. In general, Windows and cmd don't care about quotes, but the apps themselves do the splitting and might care. PowerShell expands variables within double quotes, but not within single quotes, but it's hard to say which may be preferred in any given case. So basically, "it's complicated," and we should probably just avoid having too strong an opinion. |
Uh oh!
There was an error while loading.Please reload this page.
Closespython#91856.On Windows double quotes are sometimes better, on Unix usuallysingle quotes. It's not our place to explain that, so just don't.
JelleZijlstra commentedOct 12, 2022
Opened#98204 because of the CLA issues on this one. (The change we ended up with is distinct enough from@BruceLee569's original change that I don't think there's an issue with the new PR.) |
Closes#91856.On Windows double quotes are sometimes better, on Unix usuallysingle quotes. It's not our place to explain that, so just don't.
ClosespythonGH-91856.On Windows double quotes are sometimes better, on Unix usuallysingle quotes. It's not our place to explain that, so just don't.(cherry picked from commit5f8ca1b)Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
ClosespythonGH-91856.On Windows double quotes are sometimes better, on Unix usuallysingle quotes. It's not our place to explain that, so just don't.(cherry picked from commit5f8ca1b)Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
System version: Windows 10 21H2
Python version: Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
At the command-line terminal (cmd or Powershell) you have to use double quotes to enclose the argument you wish to send. Enclose it with double quotes, and use single quotes within it. (https://stackoverflow.com/a/34379661/11687405)
For details, please refer to the GIF:https://gifyu.com/image/SLtLK