I'm working on a function in Python that takes in a list of file paths and a list of destinations, and copies each file to each of the given destinations. I have the copying portion of this function working correctly, but I need to be able to run this function asynchronously apart from the operation of a gui so that less time is taken filling out each "form." I also need the copying function to inform the user each time a file has been copied to all of the directories.
I have done a little bit of research on how to do this, but each option is quite different, using different libraries for example. How would you suggest I do this?
Since your problem is a IO bound, I would recommend you to look at threading module. With combination of Queue module you will achieve that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With