pseudo terminal usage from Python?

Grant Edwards invalid at invalid
Tue Dec 23 18:35:11 CET 2008


On 2008-12-23, skip at pobox.com <skip at pobox.com> wrote:
>     Grant> Are you sure it's not Python buffering its input?  Have you tried
>     Grant> "python -u mympstat.py"?
>
> Hmmm...  No, I hadn't considered that.  I'll check it out.  Thanks...
>
>     Grant> I had a Linux pty example running once upon a time.  If "python
>     Grant> -u" doesn't work post again, and I'll try to find it.
>
> Would be helpful even if I don't need it for this task, as I've not been
> able to find any simple examples on the net.  (Maybe there's a recipe at
> ActiveState, but Google didn't pick up anything with the search terms I was
> using.)

I'll try to dig it up.  The application for which I was trying
to use ptys needed to communication modem control/status line
state info between master and slave (as well as parity and
word-length settings), so I abandoned ptys when I found they
only implement a small subset of the icotl's that are defined
for tty devices.

I've proposed enhancing the Linux pty driver so that it can
actually be used to simulate a serial port, but the proposal
has been ignored so far.

-- 
Grant Edwards                   grante             Yow! I'm definitely not
                                  at               in Omaha!
                               visi.com            



More information about the Python-list mailing list