Help, please, make a progress bar for the folder cleaning process. I clear the folder with this command
shutil.rmtree('c:/temp', ignore_errors=True,) For this there are modules tqdm and progressbar, but how to adapt them for this task?
Help, please, make a progress bar for the folder cleaning process. I clear the folder with this command
shutil.rmtree('c:/temp', ignore_errors=True,) For this there are modules tqdm and progressbar, but how to adapt them for this task?
Source: https://ru.stackoverflow.com/questions/778305/
All Articles
os.rmdir,os.unlinkwith your versions, which are called byprogress_bar.update(). If the changes from launch to launch are expected to be relatively small, then you can save the total number of folders, other entries, the elapsed time from the previous launch, in order to estimate how many more entries you need to delete / how long it will take. - jfsfor _ in range(100): if random.random() < 0.1: i+=1; t.update(i)for _ in range(100): if random.random() < 0.1: i+=1; t.update(i)- jfs