No
Gaz
gaz082 at gmail.com
Wed Feb 22 12:31:07 EST 2006
(the Input type = FILE is in the field)
please check this out
import ftplib
import os
...
def upload(ftp, file):
ext = os.path.splitext(file)[1]
if ext in (".txt", ".htm", ".html"):
ftp.storlines("STOR " + file, open(file))
else:
ftp.storbinary("STOR " + file, open(file, "rb"), 1024)
ftp = ftplib.FTP("ftp.XXXX.f2o.org")
ftp.login("XXXXX", "XXXXX")
upload(ftp, "c:\check.jpg")
I'm still getting the file not found error:
http://img153.imageshack.us/img153/2720/error3ps.jpg
I believe the path is kinda wrong or something. But this time, the
script is supposed to fetch the file from my pc.
More information about the Python-list
mailing list