for example below is a code that simply deletes empty folder. What i want is for it to show/print what is currently being deleted.
I want a similar scenraio like when you install something on terminal and it lists it's current activities.
- Code: Select all
#deleting empty folders
for root, dirs, files in os.walk(src, topdown=False):
for file in dirs:
path = os.path.join(root, file)
if not os.listdir(path):
This is very helpfull when deleting or copying big files because you know that it is doing something.