Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

question from:https://stackoverflow.com/questions/65936149/write-on-ftp-file-without-overwrite-previous-text-ftplib-python

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
999 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...