[Tutor] Updating an FTP file
Tim Johnson
tim@johnsons-web.com
Fri, 2 Mar 2001 11:58:13 -0900
Hello:
I'd like to be able to append a line to a file at an FTP site.
#with the following command:
cmd2 = 'RETR cpwd.txt'
# read 'buffer'
line_buffer= []
#the following code will return line_buffer with lines read from the file
ftp.retrlines(cmd2,lines.append)
# I can then add the new line:
lines.append("this is the new line")
#here's where I 'hit the wall':
# How do I 'write' the update list of line back to the
# remote file.
BTW: have been looking at documentation for ftplib, but can't
seem to get focus on the appropriate method.
Sorry to be so dense.....
Regards
--
Tim Johnson
-----------
"Of all manifestations of power,
restraint impresses the most."
-Thucydides