>>>>> Piet van Oostrum <p...@cs.uu.nl> (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 <p...@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to