--pipe seems to work now, thanks to /dev/tty
--HG-- branch : pmacs2
This commit is contained in:
parent
caca90bb35
commit
1120424255
|
@ -1112,8 +1112,13 @@ if __name__ == "__main__":
|
|||
|
||||
# if we used a pipe to read some data, that will be our first buffer
|
||||
if opts.pipe:
|
||||
raise Exception("--pipe doesn't work yet")
|
||||
data = sys.stdin.read()
|
||||
# since we just read until EOF from stdin, we need to reset STDIN using
|
||||
# the TTY.
|
||||
tty = open('/dev/tty', 'r')
|
||||
os.dup2(tty.fileno(), sys.stdin.fileno())
|
||||
|
||||
# ok, so now create the actual buffer
|
||||
b = buffer.data.DataBuffer('*Pipe*', data)
|
||||
b.open()
|
||||
buffers.append(b)
|
||||
|
|
Loading…
Reference in New Issue