popen and password entry

Ganesan Rajagopal rganesan at myrealbox.com
Thu Jun 15 10:27:57 CEST 2006


>>>>> Sinan Nalkaya <orome.the.valar at gmail.com> writes:

> hi,
> i have found expect method for this purpose. i`m trying to use pexpect but
> following code gives me an something strange as a result.

When working with pexpect, logging the entire conversation is extremely
useful fro debugging

> import pexpect
> cmd = '/usr/bin/rsync config root at 10.1.1.2:/tmp/.'
> #cmd = 'ssh root at 10.1.1.2'
> child = pexpect.spawn(cmd)

Add "child.logfile = sys.stdout" here and check what's going on.

Ganesan

-- 
Ganesan Rajagopal




More information about the Python-list mailing list