pty controlling app
Brian Sturk
bsturk at news.rcn.com
Tue Dec 4 01:09:21 EST 2001
>
> Well, my copy of bash2 prints its version and exits when invoked as
>
> $ bash2 --version
>
> Changing --version to -i and putting in a few more judicious
> time.sleep()s, your code seemed to work. The output is a bit messy
> but that's because I have a fancy $PS1.
>
> Cheers,
> M.
I think I accidentally mailed you my last post instead of putting it
up here. Sorry bout that...
I found an example indirectly that seems to fix the issue, now I just
need to get select() into the picture.
Just for posterity's sake I'm posting the code that eliminated the
"echoing" of the commands I was sending.
<snip>
if pid == 0:
attrs = tty.tcgetattr(1)
attrs[3] = attrs[3] & ~tty.ICANON & ~tty.ECHO
attrs[6][tty.VMIN] = 1
attrs[6][tty.VTIME] = 0
tty.tcsetattr(1, tty.TCSANOW, attrs)
<snip>
Thanks again
--
.-----------------------------------------------------,-------.
| Brian M. Sturk - http://www.nh.ultranet.com/~bsturk \ C/C++ | .> )\,^a__
|--------------------------| bsturk at nh.ultranet.com | Java | ( _ _)/ /-." ~
| http://www.telengard.com `---------------------------`------| `( )_ )/
| Telengard Technologies Inc. - NT/*nix UI & device drivers | _<_s_<_s
'-------------------------------------------------------------'
More information about the Python-list
mailing list