From: John Carter Date: 2006-04-21T11:24:01+09:00 Subject: Re: Strange problem with PTY.spawn() On Tue, 11 Apr 2006, Reto Schuettel wrote: > Let me ask another question. Why should I (or RExpect, to be precise) > use PTY at all? As far as I can see it only spawns a programm and gets > stdin/stdout. One and only one (weak) reason. The pty interface permits you to drive programs that have the implicit expectation that they are been driven from a keyboard / screen combo and use the termios (Say "man termios" for more info). functions on the STDIN/STDOUT fd's. > Couldn't I use open3/open4 for the same purpose? I've > modified/extended the RExpect a little bit, so I'm alread used to the > internals, from my point of view I can't see any differences to the Open > libraries. I did make a (very small) start on a open3 interface to RExpect. If you feel like contributing your fixes back I would welcome them. > I have to talk network devices (Cisco Router/Switches) over ssh/telnet > session (ssh prefered, of course ;)). I originally wrote rexpect to pretend to be lots and lots and lots of imaginary devices on the end of lots and lots of imaginary rs-232 lines. Currently my only use is to use 'ssh' to takeover my colleagues boxes and install, configure and run distcc on them. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand Carter's Clarification of Murphy's Law. "Things only ever go right so that they may go more spectacularly wrong later." From this principle, all of life and physics may be deduced.