issue while doing pexpect ssh

harirammanohar159 at gmail.com harirammanohar159 at gmail.com
Tue Sep 8 13:37:09 CEST 2015


Some where i am missing simple logic.... :)

=====
child = pexpect.spawn('ssh hari at 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...


More information about the Python-list mailing list