I'm needing to transfer the following shell construct to Python, plus save
the output of execution:

FTP_SITE='ftp.somesite.com'
ftp -a  $FTP_SITE <<EOF
binary
prompt off
cd /some_dir
dir
bye
EOF

Here, the FTP client accepts commands from STDIN, so all commands are saved
in a temporary file which is redirected to the client application.

I also need to save whatever output is generated.  How can this be done in
Python?

Thanks.

Jim
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to