[issue2683] subprocess.Popen.communicate takes bytes, not str

2011-09-26 Thread Christoph Schindler

Christoph Schindler h...@30hopsmax.at added the comment:

The doc string refers to string instead of byte string as well.

--
nosy: +hop
Added file: http://bugs.python.org/file23245/subprocess_doc_string.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2683
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Fixed docs in r64619.

--
resolution:  - fixed
status: open - closed

___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Rafael Zanella

Rafael Zanella [EMAIL PROTECTED] added the comment:

_communicate still encodes the string under the hood

___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

You're right, I fixed that too in r64621.

___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-06-29 Thread Rafael Zanella

Rafael Zanella [EMAIL PROTECTED] added the comment:

On subprocess.py the new method communicate() doesn't encode the string:


_communicate(self, input):
...
  if isinstance(input, str):
input = input.encode()
...


I've attached a patch that adds the str.encode() call on communicate().

--
keywords: +patch
nosy: +zanella
Added file: http://bugs.python.org/file10779/subprocess_strEncode.diff

___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-06-29 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Hmm. I think it's better to make people explicity encode their string.

___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-06-22 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I say docs.

--
assignee:  - georg.brandl
components: +Documentation -Extension Modules
nosy: +benjamin.peterson, georg.brandl

___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-06-21 Thread Martin v. Löwis

Changes by Martin v. Löwis [EMAIL PROTECTED]:


___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-06-21 Thread admin

admin [EMAIL PROTECTED] added the comment:

What is wrong? Documentation or method?

___
Python 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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-04-24 Thread Lenard Lindstrom

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