fdutils/web/_utils.py
def copyfileobj_counter(fsrc, fdst, length=16 * 1024):
    """ a clone of shutil.copyfileobj with an added counter for the number of chunks written so far """
    chunks = 0
    try:
        while 1:
            buf = fsrc.read(length)
            if not buf:
                break
            fdst.write(buf)
            chunks += 1
    except urllib3.exceptions.HTTPError as e:
        return chunks, e
    return chunks, 0
 a clone of shutil.copyfileobj with an added counter for the number of chunks written so far 
a clone of shutil.copyfileobj with an added counter for the number of chunks written so far
a clone of shutil . copyfileobj with an added counter for the number of chunks written so far
def copyfileobj_counter(fsrc, fdst, length=16 * 1024):
    chunks = 0
    try:
        while 1:
            buf = fsrc.read(length)
            if not buf:
                break
            fdst.write(buf)
            chunks += 1
    except urllib3.exceptions.HTTPError as e:
        return chunks, e
    return chunks, 0
def copyfileobj_counter ( fsrc , fdst , length = 16 * 1024 ) : chunks = 0 try : while 1 : buf = fsrc . read ( length ) if not buf : break fdst . write ( buf ) chunks += 1 except urllib3 . exceptions . HTTPError as e : return chunks , e return chunks , 0
a clone of shutil.copyfileobj with an added counter for the number of chunks written so far
a clone of shutil . copyfileobj with an added counter for the number of chunks written so far
""" a clone of shutil.copyfileobj with an added counter for the number of chunks written so far """
fsrc
fdst
length