This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kermode
Recipients kermode
Date 2008-04-24.18:57:19
SpamBayes Score 0.0204577
Marked as misclassified No
Message-id <>
subprocess.Popen.communicate is documented as taking a string as the 
input argument. Instead is accepts only a binary stream (bytes).

Python 3.0a4 (r30a4:62126, Apr  3 2008, 15:34:18) [MSC v.1500 32 bit 
(Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> from subprocess import Popen, PIPE
>>> p = Popen('', stdin=PIPE)
>>> p.communicate("dir\n")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python30\lib\", line 588, in communicate
  File "C:\Python30\lib\", line 844, in write
    raise TypeError("can't write str to binary stream")
TypeError: can't write str to binary stream
Date User Action Args
2008-04-24 18:57:20kermodesetspambayes_score: 0.0204577 -> 0.0204577
recipients: + kermode
2008-04-24 18:57:20kermodesetspambayes_score: 0.0204577 -> 0.0204577
messageid: <>
2008-04-24 18:57:19kermodelinkissue2683 messages
2008-04-24 18:57:19kermodecreate