Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
Hey, its resolved by small tweak :) do child.sendline('logout') instead of child.logout() Thanks... -- https://mail.python.org/mailman/listinfo/python-list

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: >

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: >

Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
>Hey All, > >I am able to achieve this using pxssh.. thank you for help... Great to hear it. Good luck with the crazies. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
In a message of Wed, 09 Sep 2015 01:58:30 -0700, harirammanohar...@gmail.com wr ites: >Thank you for spawnu, now i got stuck with freezing issue similar to it is not >returing to the shell prompt...its on waiting...i had to press ctrl+c > >=== >child.sendline(password) >child.expect('-bas

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: >

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: >

Re: issue while doing pexpect ssh

2015-09-08 Thread Laura Creighton
In a message of Tue, 08 Sep 2015 23:57:41 +1000, Chris Angelico writes: >On Tue, Sep 8, 2015 at 9:37 PM, wrote: >> Some where i am missing simple logic :) >> >> = >> child = pexpect.spawn('ssh hari@hostname') >> child.logfile = sys.stdout >> child.expect('hari\'s Password: ') >> = >>

Re: issue while doing pexpect ssh

2015-09-08 Thread jmp
On 09/08/2015 03:57 PM, Chris Angelico wrote: On Tue, Sep 8, 2015 at 9:37 PM, wrote: Some where i am missing simple logic :) = child = pexpect.spawn('ssh hari@hostname') child.logfile = sys.stdout child.expect('hari\'s Password: ') = getting error as follows: child.e

Re: issue while doing pexpect ssh

2015-09-08 Thread Chris Angelico
On Tue, Sep 8, 2015 at 9:37 PM, wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: > > child.expect('hari\'s Password: ') >

Re: issue while doing pexpect ssh

2015-09-08 Thread Laura Creighton
In a message of Tue, 08 Sep 2015 04:37:09 -0700, harirammanohar...@gmail.com wr ites: >Some where i am missing simple logic :) > >= >child = pexpect.spawn('ssh hari@hostname') >child.logfile = sys.stdout >child.expect('hari\'s Password: ') >= > >getting error as follows: > >

issue while doing pexpect ssh

2015-09-08 Thread harirammanohar159
Some where i am missing simple logic :) = child = pexpect.spawn('ssh hari@hostname') child.logfile = sys.stdout child.expect('hari\'s Password: ') = getting error as follows: child.expect('hari\'s Password: ') TypeError: must be str, not bytes === Thanks... -- h