Python Forum
best way to copy a big binary file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
best way to copy a big binary file
#15
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')
2178168457
Return 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)
Reply


Messages In This Thread
best way to copy a big binary file - by Skaperen - Aug-26-2019, 07:17 PM
RE: best way to copy a big binary file - by Larz60+ - Aug-26-2019, 07:36 PM
RE: best way to copy a big binary file - by wavic - Aug-29-2019, 10:38 AM
RE: best way to copy a big binary file - by Larz60+ - Sep-02-2019, 04:11 AM
RE: best way to copy a big binary file - by Larz60+ - Sep-02-2019, 11:58 PM
RE: best way to copy a big binary file - by Larz60+ - Sep-05-2019, 03:43 AM
RE: best way to copy a big binary file - by snippsat - Sep-06-2019, 08:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how would you copy a file? Skaperen 17 5,058 Oct-04-2019, 07:15 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020