Author RadicalZephyr
Recipients RadicalZephyr, docs@python, martin.panter, twouters
Date 2015-10-07.02:34:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hmm, I spoke improperly.  I think you are entirely correct in your statements.  What I meant by "terminals ignore null bytes" is that returning a string consisting of only a null byte doesn't cause anything observable to happen, including anything to be written to the screen.  But I have no idea why this is.

My basis for this is limited to empirical observation of how my terminal behaves (I use the iTerm2 terminal emulator on Mac OS X), and I don't recall whether I checked it with other terminals like the regular terminal on Mac and terminal emulators on Linux.

Re: "or any falsey value".  In general, the _read_ functions should return byte strings yes, but since the check for EOF in python is whether a stream returned an empty string, and the way that pty.spawn() currently checks for that is `if not data` then any falsey value will cause pty.spawn to think that the underlying fd was closed.

I agree that the documentation on this could use more fleshing out in general, especially regarding what happens when certain values are returned.  I'm not very familiar with this code any more, but I might have time to play with it and try to add some more information in the coming weeks.
Date User Action Args
2015-10-07 02:34:43RadicalZephyrsetrecipients: + RadicalZephyr, twouters, docs@python, martin.panter
2015-10-07 02:34:43RadicalZephyrsetmessageid: <>
2015-10-07 02:34:43RadicalZephyrlinkissue22865 messages
2015-10-07 02:34:42RadicalZephyrcreate