_...@163.com wrote:
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
def getpart(self, ftp_filename, rest, cnt, out_filename):
self.outf = open(out_filename, 'wb')
self.cnt = cnt
self.han
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:
On 25 Lug, 09:48, [EMAIL PROTECTED] wrote:
> 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_de
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):