New submission from Anthony Sottile:
First some expected output:
```
# from cmd.exe
C:\Users\Anthony>echo hi{1}
hi{1}
# from MINGW
$ echo hi{1}
hi{1}
```
```
# On ubuntu
$ echo 'hi{1}'
hi{1}
$ python3.5 -c "import subprocess; print(subprocess.check_output(('echo',
'hi{1}')))"
b'hi{1}\n'
```
Now for the unexpected output (produced only by python on windows) (notice the
missing braces)
```
C:\Python27\python.exe -c "import subprocess;
print(subprocess.check_output(('echo', 'hi{1}')))"
hi1
C:\Python34\python.exe -c "import subprocess;
print(subprocess.check_output(('echo', 'hi{1}')))"
b'hi1\n'
C:\Python35\python.exe -c "import subprocess;
print(subprocess.check_output(('echo', 'hi{1}')))"
b'hi1\n'
```
Peculiarly, these all produce the output I expect:
```
C:\Python35\python.exe -c "import subprocess;
print(subprocess.check_output(('echo', 'hi {1}')))"
b'hi {1}\n'
C:\Python35\python.exe -c "import subprocess;
print(subprocess.check_output(('echo', 'hi{1}'), shell=True))"
b'hi{1}\r\n'
```
I don't have access to 3.6, but I imagine the issue exists there too.
----------
components: Windows
messages: 256043
nosy: Anthony Sottile, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Improper subprocess output of arguments with braces in them on windows
versions: Python 2.7, Python 3.4, Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25815>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com