Uploading a file with ftplib

Bill Herron bherron at aifittings.com
Wed Jul 7 10:12:29 EDT 2004


Michael,
I tried the following to FTP a file and only transfered a "blank" file...
Any suggestions?
Bill


        file1=entry1.get()
        file1=file1.strip()
        ftp = FTP('xxxx','xxx','xxxxxx'')
        ftp.cwd('/tmp')
        ftp.storbinary("STOR " + file1, file('c:/tmp/'+file1, "rb"))
        ftp.quit()



William Herron
Arlington Industries, Inc
1 Stauffer Industrial Park
Scranton, Pa. 18517
800.233.4717
FAX 570.562.0646
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040707/9626dd19/attachment.html>


More information about the Python-list mailing list