[New-bugs-announce] [issue4036] Support bytes for subprocess.Popen()

STINNER Victor report at bugs.python.org
Sat Oct 4 01:45:15 CEST 2008

New submission from STINNER Victor <victor.stinner at haypocalc.com>:

subprocess doesn't support bytes for the "args" argument.
 - On Windows, subprocess._execute_child() converts args to a string 
if it was a list
 - On UNIX, subprocess._execute_child() converts args to a list if 
it's a string

If shell=True, _execute_child() adds a prefix to the arguments.

I don't know if subprocess should accept bytes in a command line. 
Attached patch fixes POSIX version of subprocess to support bytes.

See also related issue #4035.

files: os_exec_bytes.patch
keywords: patch, patch
messages: 74284
nosy: haypo
severity: normal
status: open
title: Support bytes for subprocess.Popen()
versions: Python 3.0
Added file: http://bugs.python.org/file11696/os_exec_bytes.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list