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@python components: Documentation, Library (Lib) files: pty.patch keywords: patch messages: 231126 nosy: RadicalZephyr, docs@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 <rep...@bugs.python.org> <http://bugs.python.org/issue22865> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com