Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48859
| X-Received | by 10.224.205.138 with SMTP id fq10mr12670927qab.1.1371813152572; Fri, 21 Jun 2013 04:12:32 -0700 (PDT) |
|---|---|
| X-Received | by 10.49.47.10 with SMTP id z10mr277271qem.7.1371813152549; Fri, 21 Jun 2013 04:12:32 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!j2no1082183qak.0!news-out.google.com!y6ni3811qax.0!nntp.google.com!j2no1082179qak.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Fri, 21 Jun 2013 04:12:32 -0700 (PDT) |
| In-Reply-To | <mailman.3640.1371765829.3114.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=193.203.82.231; posting-account=brMX7QoAAACp1VlX0gcUmoz7EYoMJCQ1 |
| NNTP-Posting-Host | 193.203.82.231 |
| References | <c280b727-f979-4107-89e8-a4a54be2fbfa@googlegroups.com> <mailman.3640.1371765829.3114.python-list@python.org> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <36d7783e-92b9-4c02-ae23-7c42fdbca4cd@googlegroups.com> (permalink) |
| Subject | Re: New line conversion with Popen attached to a pty |
| From | jfharden@gmail.com |
| Injection-Date | Fri, 21 Jun 2013 11:12:32 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.python:48859 |
Show key headers only | View raw
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.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
New line conversion with Popen attached to a pty jfharden@gmail.com - 2013-06-20 06:28 -0700
Re: New line conversion with Popen attached to a pty Peter Otten <__peter__@web.de> - 2013-06-21 00:04 +0200
Re: New line conversion with Popen attached to a pty jfharden@gmail.com - 2013-06-21 04:12 -0700
csiph-web