[issue7240] subprocess.Popen.stdout.flush fails os OS-X 10.6.1

2009-10-29 Thread Peter Gibson

New submission from Peter Gibson :

subprocess.Popen.stdout.flush() fails on OS-X 10.6.1 under the bundled
Python 2.6.1 and 2.6.3 from Macports.

>>> from subprocess import Popen, PIPE
>>> p = Popen('cat', stdin=PIPE, stdout=PIPE)
>>> p.stdout.flush()
Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 9] Bad file descriptor

However it works on Python 2.6.2 on Linux.

--
components: Library (Lib)
messages: 94694
nosy: petegibson
severity: normal
status: open
title: subprocess.Popen.stdout.flush fails os OS-X 10.6.1
type: crash
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue7240>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7240] subprocess.Popen.stdout.flush fails os OS-X 10.6.1

2009-10-30 Thread Peter Gibson

Peter Gibson  added the comment:

Not my code, but as it's using a pipe to communicate with another
process, I assume that the flush call is intended to discard any
unwanted output prior to sending a command and processing the result.

Is there another way to achieve the same effect, such as reading and
remaining characters in the buffer?

--

___
Python tracker 
<http://bugs.python.org/issue7240>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com