New submission from Lenard Lindstrom <[EMAIL PROTECTED]>: 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 win32 Type "help", "copyright", "credits" or "license" for more information. >>> from subprocess import Popen, PIPE >>> p = Popen('command.com', stdin=PIPE) >>> p.communicate("dir\n") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python30\lib\subprocess.py", line 588, in communicate self.stdin.write(input) File "C:\Python30\lib\io.py", line 844, in write raise TypeError("can't write str to binary stream") TypeError: can't write str to binary stream ---------- components: Extension Modules messages: 65740 nosy: kermode severity: normal status: open title: subprocess.Popen.communicate takes bytes, not str versions: Python 3.0 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2683> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com