Message274517
| Author |
vstinner |
| Recipients |
Arfrever, amaury.forgeotdarc, berwin22, chris.jerdonek, eric.araujo, mark, martin.panter, mightyiam, ncoghlan, pitrou, r.david.murray, segfaulthunter, srid, steve.dower, vstinner |
| Date |
2016年09月06日.04:40:03 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAMpsgwb3CaDmJeFm9azO1tnRt0mDqrPG_Z5qNgLgqje3hLMMHA@mail.gmail.com> |
| In-reply-to |
<1473134997.4.0.378663760898.issue6135@psf.upfronthosting.co.za> |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年09月06日 04:40:03 | vstinner | set | recipients:
+ vstinner, amaury.forgeotdarc, ncoghlan, pitrou, mark, eric.araujo, segfaulthunter, Arfrever, r.david.murray, srid, mightyiam, chris.jerdonek, martin.panter, steve.dower, berwin22 |
| 2016年09月06日 04:40:03 | vstinner | link | issue6135 messages |
| 2016年09月06日 04:40:03 | vstinner | create |
|