Answer the question
In order to leave comments, you need to log in
How to reflect the progress of sorted(os.listdir(self.target_path)) operation?
Hello. There is a software in Python 2.7 and PyQt, during which this code is executed:
file_list = sorted(os.listdir(self.target_path))
in the desired folder> 10K files. The process is executed in a separate thread, the GUI does not freeze, but it is still not clear to the user how long the operation will take (you can go to smoke or it is better to wait) ... And my progress bar on the form starts counting only from the moment the file_list is bypassed and processed.
So the question is: how can I attach the progressbar to the sorted(os.listdir(self.target_path)) operation?????
Thanks in advance!
* Do not offer an option with an endlessly running strip inside the progress bar =)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question