Coding problems with ftplib and uploading a file
Patrick Phalen
python-list at teleo.net
Fri Feb 18 16:01:06 EST 2000
[pem at my-deja.com, on Fri, 18 Feb 2000]
:: ftp = FTP('servername')
:: ftp.login('uname', 'passwd')
:: ftp.sendcmd('cdup')
:: ftp.sendcmd('cdup')
:: ftp.cwd('/web')
:: fini = open('/myfile.html').readlines()
:: ftp.storlines('STOR ' fini)
:: ftp.quit()
::
:: All of the commands work just fine except for the storlines command. I
:: have read all of the documentation available to me at work (Programming
:: in Python and Learning Python, and web docs on ftplib) but none are
:: clear about the syntax of the storlines command. In addition, I read
:: the ftplib.py as well as the rfc 959 on FTP and I guess I am just not
:: getting it. Any help would be greatly appreciated.
You need a comma between 'STOR ' and fini
More information about the Python-list
mailing list