Александр Бондарев <alexander.i.bonda...@gmail.com> added the comment:

Can you please re-open this bug?
I'm not agree that this a correct behavior.
Usually we are using subprocess.check_output([..]) version to not aware about 
argument escaping and it works good for Linux.

In example:
> subprocess.check_output(['echo', "'hello'"])
"'hello'"

But:
> subprocess.check_output("echo 'hello'", shell=True)
'hello'

I'm expecting same behavior on Windows system, but:
> subprocess.check_output(['echo', "'hello'"])
'hello'
> subprocess.check_output("echo 'hello'", shell=True)
'hello'

and 
> subprocess.check_output(['echo', "'@{u}'"])
'@{u}'
> subprocess.check_output(['echo', "@{u}"])
'@u'

and it even more confusing:

> subprocess.check_output(['echo', " @{u}"])
' @{u}'

because if it detects some spaces in argument then it tries to quote this and 
it is correct behavior, but it should also care about other kind of characters 
to escape.

We definitely should bring more love for Windows!

----------
nosy: +Александр Бондарев

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue25815>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to