Re: How to check if Pexpect child already exist?

2012-12-05 Thread Dave Angel
On 12/05/2012 02:41 AM, Thomas Elsgaard wrote: > Hi List > > I am wondering, how can i check if child already exist before i spawn > ? By definition, before you call the spawn, the child doesn't exist. So presumably you must mean something else. > child.isalive() cannot be done on child before

How to check if Pexpect child already exist?

2012-12-04 Thread Thomas Elsgaard
Hi List I am wondering, how can i check if child already exist before i spawn ? child.isalive() cannot be done on child before it has been spawned. --- import pexpect child=pexpect.spawn('ssh mysurface@192.168.1.105') child.sendline('test') --- Thomas -- http://mail.python.org/mailman/listinfo