Hi All,
I made a python ftp client on Windows XP which does binary get & put.
The issue here is that when I do FTP manually the time taken to either GET or PUT is about half the time taken by my ftp client.
Following is a snippet of my code; Is there a better approach to do this?
def get(self,filename):
try:
start = time.clock()
self.ftph.retrbinary('RETR '+ filename, open(filename, 'wb').write)
end = time.clock()
except Exception:
print "Error in downloading the remote file."
return
else:
print "Successful download!"
print "GET completed in %f seconds." % (end-start)
return
Thanks