[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True
R. David Murray
report at bugs.python.org
Thu Apr 5 22:02:40 CEST 2012
R. David Murray <rdmurray at bitdance.com> added the comment:
No, you need to be able to pass bytes to Popen, just like you do to the os.exec[xx] functions. When the OS doesn't fully support unicode, that is sometimes the only option. As for filenames; again, as long as the underlying systems use bytes filenames we need to support it. Currently we encode them when received using surrogateescape and decode them back to bytes when used.
I am not sure what os.exec[xx] does with strings containing non-ascii. Presumably it uses some default encoding or other, which seems to be utf-8 on my system. (It doesn't seem to be explicitly documented where those functions are discussed in the os module.)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7839>
_______________________________________
More information about the Python-bugs-list
mailing list