Running python from pty without prompt
Random832
random832 at fastmail.com
Tue Dec 13 12:48:07 EST 2016
More information about the Python-list mailing list
Tue Dec 13 12:48:07 EST 2016
- Previous message (by thread): Running python from pty without prompt
- Next message (by thread): Running python from pty without prompt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Dec 13, 2016, at 11:01, Michael Torrie wrote: > On 12/13/2016 05:39 AM, Samuel Williams wrote: > > Michael, yes. > > > > FYI, I found out why this works. Pressing Ctrl-D flushes the input > > buffer. If you do this on an empty line, it causes read(...) to return > > 0 which Ruby considers end of input for the script, but the pipe is > > not closed. > > Currently Python does not appear to support this behavior. Possibly it > could be patched to support something similar, though. The problem is there's currently no way to differentiate "interactive mode" from "script run on a tty". You can get similar behavior with python -c "import sys;exec(sys.stdin.read())"
- Previous message (by thread): Running python from pty without prompt
- Next message (by thread): Running python from pty without prompt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list