homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: subprocess.call with pipe character in argument
Type: behavior Stage: resolved
Components: Windows Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Pedro.Larroy, brian.curtin, r.david.murray, vstinner
Priority: normal Keywords:

Created on 2012年04月25日 17:21 by Pedro.Larroy, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (4)
msg159322 - (view) Author: Pedro Larroy (Pedro.Larroy) Date: 2012年04月25日 17:21
When running a command with pipe character as argument the result is not the same as in commandline
For example:
>>> subprocess.call([r"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Commo
n7\IDE\devenv","/build",r"Debug|x64","gpc10.sln"], shell=False)
Chockes on Debug|x64 and just exits with 1.
Running python 2.7.1 r271:86832
msg159329 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012年04月25日 17:53
If shell is false, the pipe character is not special.
msg159331 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012年04月25日 17:56
Oops, I typed too fast, and didn't notice that you were talking about windows. My point may still be valid, but I shouldn't be the one to close the issue since I don't know for sure for windows.
msg159342 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012年04月25日 23:34
Ah, I thought I remembered seeing something about '|' in windows before, and I was right. It is only special to cmd.exe, which means it is only special when shell=True. See issue 1300 for a discussion.
History
Date User Action Args
2022年04月11日 14:57:29adminsetgithub: 58875
2012年04月25日 23:34:29r.david.murraysetstatus: open -> closed

messages: + msg159342
2012年04月25日 23:01:47vstinnersetnosy: + vstinner
2012年04月25日 17:56:32r.david.murraysetmessages: + msg159331
2012年04月25日 17:56:02r.david.murraysetmessages: - msg159330
2012年04月25日 17:55:45r.david.murraysetstatus: closed -> open
nosy: + brian.curtin
messages: + msg159330

2012年04月25日 17:53:32r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg159329

resolution: not a bug
stage: resolved
2012年04月25日 17:21:56Pedro.Larroycreate

AltStyle によって変換されたページ (->オリジナル) /