From: ara.t.howard@... Date: 2006-04-11T06:53:45+09:00 Subject: Re: Strange problem with PTY.spawn() On Tue, 11 Apr 2006, Reto Schuettel wrote: > Hi, > > it's me again :) (one more mail and you can call it spamming, ;))[1] > > On Tue, Apr 11, 2006 at 12:06:56AM +0900, Reto Schuettel wrote: >> Can anybody help me with this? I have no idea how I could fix/avoid this >> problem. > > 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. 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 have to talk network devices (Cisco Router/Switches) over ssh/telnet > session (ssh prefered, of course ;)). > > > Cheers, > Reto Schuettel some programs require a tty and some do not. and example of something that requires a tty is ssh when it asks for you password since it needs to hide the typed chars. you can't do that with a pure io stream. do, depending on which program you are driving you may or may not be able to use open3. you may want to check out my session package, it wraps open3 in a way that makes it brain dead simple to use with sh. regards. -a -- be kind whenever possible... it is always possible. - h.h. the 14th dali lama