"Scott Ballard" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]

> Sorry for the lame question, I'm still trying to pick up Python and new to
> the list here.
It's not a lame question...

> Question:
> I'm trying to write a python script that will access an FTP site and 
> upload
> some files. I've gotten everything working except for the actual uploading
> of the files.
>
> I'm assuming that  I should use storbinary( command, file[, blocksize]) to
> transfer the files. the documentation says "command should be an 
> appropriate
> "STOR" command: "STOR filename"."
>
> I can't seem to figure out an `appropriate "STOR" command' is???
The ftplib is perhaps too low level in this regard. There are a few 
variants: STOR, STOU, APPE. Try Google, or go right into the official 
specification, RFC959.
http://www.faqs.org/rfcs/rfc959.html (specially section 4.1, FTP Commands).
The example command above "STOR filename" will upload the file (the second 
argument to storbinary) overwriting without prompt any previous file with 
the same name (if it existed).

-- 
Gabriel Genellina 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to