I have a application which does following steps in a list of the files
1. Encrypt the file
2. Compress the file
3. Upload to a ftp server
I have above functionality in application and code is working as expected. It takes more time as it's sequential and I am planning to reduce the time to run above three steps in all the associated files parallel so that total time can be reduced dramatically. I see subprocess module (
https://docs.python.org/2/library/subprocess.html ) can help me to get it run in parallel. Appreciate if someone can give me a example code on how to get it done. Any help is very much appreciated.
You might look at the multiprocessing module ( https://docs.python.org/2/library/multiprocessing.html )
What might be of special interest to you is the process pool.
Please look at 16.6.1with an example of how to use Poll