[New-bugs-announce] [issue22865] Allow pty.spawn to ignore data to copy

Geoff Shannon report at bugs.python.org
Thu Nov 13 19:01:26 CET 2014


New submission from Geoff Shannon:

While using the pty.py module I had cause to want to be able to silently eat characters from the input stream.  I discovered that because of the check for end of file being "if not data" that there was no way to do this.

Since the default function used by spawn and _copy is a thin wrapper on os.read, I figured that it would be useful to interpret None as a sentinel value meaning "this is not EOF, but there's nothing I actually want to copy over."

----------
assignee: docs at python
components: Documentation, Library (Lib)
files: pty.patch
keywords: patch
messages: 231126
nosy: RadicalZephyr, docs at python
priority: normal
severity: normal
status: open
title: Allow pty.spawn to ignore data to copy
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file37189/pty.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22865>
_______________________________________


More information about the New-bugs-announce mailing list