>>>>> Piet van Oostrum <[email protected]> (PvO) wrote: [snip] >PvO> You can also consider using paramiko instead of pexpect. [snip] >>>>> chan = t.open_session() >>>>> chan.exec_command('cat') >>>>> chan.send('abcdefghijklmn\n')
In a real program it is better to use sendall here, as send may decide to send only part of its argument (the result will tell how many bytes have been sent). -- Piet van Oostrum <[email protected]> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: [email protected] -- http://mail.python.org/mailman/listinfo/python-list
