I'm trying to write on hosted file from python, so I chose to use ftplib module. So far i got this code
from ftplib import FTP import io ftp = FTP('ftp.myhostname.com') ftp.login('myusername','mypass') #ftp.retrlines('LIST') bio = io.BytesIO(b'randomtext') ftp.storbinary('STOR test.php', bio) #ftp.retrbinary('RETR /test.php', "test", wb) input()
but it overwrites the previous text.
2.1m questions
2.1m answers
60 comments
57.0k users