okay right now i am using ftp to download a file for my application but the problem is the code as it stands downloads the files when i launch the program and does nothing when i click the download button
# Handlers for MainFrameBase events.
def DownloadButtonClick( ftp,directory,file ):
ftp.cwd(directory)
f = open(file,"wb")
ftp.retrbinary("RETR " + file,f.write)
f.close()
ftp = ftplib.FTP("ftp.apkmultitool.com")
ftp.login("adkesoapp@apkmultitool.com", "adkesoapp")
DownloadButtonClick(ftp, "", "testfile.txt")
I am using wxbuilder to design the GUI for my application and I am a newbie to python and i have tried Google looking for my answer but nothing has came up I also want when the button is press that it will check for the file and if already exist that it will append to the document instead of overwriting.
i might just scrap the idea and have it download from the raw link of the text file as u doubt i can upload the file back to the server and have it do checks and amend to it as well but i also do not want it to cause duplicated entries so any advice as to prevent that might be best in its own question but this is the bases behind what i am ultimately wanting to accomplish
if you want to see the complete source