Skaperen Wrote:how does tqdm know how big the file is?See that i use os.path.getsize
λ ptpython >>> import os >>> os.path.getsize('2.1GB.rar') 2178168457Return size in bytes,then use
unit='B', unit_scale=True
,this tell tqdm to count bytes in block size.If eg use 16 kb buffer_size,will see that the progress bar get a more stuttering way,because of smaller block size.
file_copy(file_name, path_out, buffer_size=16384)