Ich habe dieses Programm schreiben:Wie sieht man die Ausgabe in pexpect?
[[email protected] ~]$ cat ftp.py
#!/usr/bin/env python
# This connects to the rediris ftp site
#
import pexpect
child = pexpect.spawn('ftp ftp.rediris.es')
child.expect('Name .*: ')
child.sendline('anonymous')
child.expect('ftp> ')
child.sendline('[email protected]')
child.expect('ftp> ')
child.sendline('lcd /tmp')
child.expect('ftp> ')
child.sendline('pwd')
child.expect('ftp> ')
child.sendline('bye')
[[email protected] ~]$ ./ftp.py
[[email protected] ~]$
[[email protected] ~]$
[[email protected] ~]$
Aber ich den Ausgang nicht sehen kann. Wie könnte ich es sehen? Ich sehe nichts, wenn ich es ausführe. Wie könnte ich die Ausgabe sehen?