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
#11
i also want to be able to output a progress indicator, such as the number of bytes copied so far. that rules out using anything that carries out the whole copy before completing. i'm thinking of implementing my copier as a generator that yields an int of the number of byte copied so far.
for number_of_bytes in copy_gen(fin,fout):
    print(f'\r{number_of_bytes} ',end='',flush=True)
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
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 Skaperen - Sep-05-2019, 12:41 AM
RE: best way to copy a big binary file - by Larz60+ - Sep-05-2019, 03:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how would you copy a file? Skaperen 17 4,982 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