Open lalligood opened 2 years ago
There's a fun fact here: tqdm should have implemented a rich progress bar renderer. I should dive into that one as an extra video for the tqdm content.
Got a code example that you're having trouble with? It feels like something that does something like;
import pathlib
from rich.progress import track
# I'm assuming you want to copy only the csv files.
local_files = pathlib.Path("folder").glob("**/*.csv")
for n in track(list(local_files), description="Processing..."):
copy_csv_file(n)
should work.
I have struggled with configuring progress bars in rich, particularly when it comes to having a list of local files that I am attempting to move/copy to another (local) location so that there is a progress bar indicator showing percentage of each file being moved/copied. (FWIW, the documentation for rich--and quite possibly rich's underlying code uses tqdm(?)--seems to fall short in this area too.)
I know the tqdm: files and descriptions video shows interacting with a list of files, but I do not believe this is the same as showing the percentage of a lengthy file operation has been completed.
Thank you for your consideration in creating a video that covers this topic!