New submission from Glenn Linderman <v+pyt...@g.nevcal.com>:

While http://bugs.python.org/issue2683 did clarify the fact that the 
.communicate API takes a byte stream as input, it is easy to miss the 
implication.  Because Python programs start up with stdin as a text stream, it 
might be good to point out that some action may need to be taken to be sure 
that the receiving program expects a byte stream, or that the byte stream 
supplied should be in an encoding that the receiving program is expecting and 
can decode appropriately.

No mention is presently made in the documentation for .communicate that its 
output is also a byte stream, and if text will correspond to whatever encoding 
is used by the sending program.

----------
assignee: d...@python
components: Documentation
messages: 121869
nosy: d...@python, v+python
priority: normal
severity: normal
status: open
title: subprocess PIPEs are byte streams
versions: Python 3.2

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

Reply via email to