Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

ftplib tqdm

with open(filename, 'wb') as fd:
    total = ftpclient.size(filename)

    with tqdm(total=total) as pbar:
        def callback_(data):
            l = len(data)
            pbar.update(l)
            fd.write(data)

        ftpclient.retrbinary('RETR {}'.format(filename), callback_)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ftplib #tqdm
ADD COMMENT
Topic
Name
4+9 =