On Thursday, 20 June 2013 23:04:39 UTC+1, Peter Otten wrote:
> (2) Fiddle with terminal options, e. g.
>
> attrs = termios.tcgetattr(outSlave)
> attrs[1] = attrs[1] & (~termios.ONLCR) | termios.ONLRET
> termios.tcsetattr(outSlave, termios.TCSANOW, attrs)
>
> p = subprocess.Popen(
> ("/bin/cat", "output.txt"),
> stdout=outSlave,
> )
>
> Disclaimer: I found this by try-and-error, so it may not be the "proper"
> way.
Thank you! That is absolutely perfect. I had read about pty options but didn't
think to read about tty options. If we ever meet in real life remind me to buy
you a beverage of your choosing.
--
http://mail.python.org/mailman/listinfo/python-list