STINNER Victor added the comment:

Steve:
> You may be right about leaving out the opener API. The only use of it right 
> now is for separate encodings, but I don't know how valuable that is.

My proposal is: Popen(cmd, stdin={'encoding': 'oem'},
stdout={'encoding': 'ansi'})

The dict would just be passed to TextIOWrapper, so you can set even
more arguments:

* encoding
* errors
* newline
* line_buffering
* write_through

But I still think that simple encoding + errors arguments should be
added for the common case : Popen(cmd, encoding='utf8').

You can combine options: Popen(cmd, stdin={'encoding': 'oem'},
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='ansi'):
stdout and stderr use the ANSI code page.

----------

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

Reply via email to