Re: Unable to abort a FTP command?

2007-07-25 Thread _wdx
Thank you. You are right, retrbinary did not notice I want to abort, so it won't break the recv loop and close data connection. I changed getpart and callback like this, now it works: def getpart_callback(self, received): print "received a packet" if self.cnt <= 0:

Unable to abort a FTP command?

2007-07-25 Thread _wdx
Hi, I write the following script to retrieve a part of a large file from a FTP site: import ftplib class ftp_getter(object): def __init__(self): self.handle = ftplib.FTP('ftp_server_address') self.handle.set_debuglevel(2) self.login() def login(self):