you can like below
import some class in your
from ftplib import FTP objec=FTP("yourIP") objec.login("youruser","passs") objec.storbinary('STOR yourfile.txt', open('yourexixtingfile.txt', 'rb')) objec.close()
After successfull login
use properties of
objec object such as upload reload ,read file from etc......
hope this is help you
just see the
objec FTP's method you can it easily
you can use the built-in ftp library (http://stackoverflow.com/questions/12613797/python-script-uploading-files-via-ftplink text) or you can avoid using ftp and trying via xml-rpc that's a more stable solution IMO.
If you need to understand how to deal with xml-rpc, you can look at the official docs here:
do not forget that XML-RPC cannot manage binary files as-is, you'll have to read the content and convert it into a base64 string.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 5/24/13, 4:38 AM|
|Seen: 3269 times|
|Last updated: 3/16/15, 8:10 AM|