Okay but you are executing a linear thread which means nothing after this
---
So in order for you to have dual processing as you seem to be wanting you will have to fire off a second process using Multiprocessing because a Thread, due to GIL, does basically the same thing as Subprocess -- although there are tricks to get a Thread to allow the OS to do something else prior to completing and perhaps the Subprocess can as well but I without looking more closely into this I cannot say for sure. Note I did look into this previously (a while back) for what I am doing and ended up using a combination of Threads and Multiprocessing as if I recall correctly the Subprocess basically works sort of like a Thread due to python's GIL restrictions but did not have the flexibility that a Thread provided me
process = Popen(command, stdout=PIPE, shell=True)gets executed until it completes as per the documentation on subprocess:
- Run the command described by args. Wait for command to complete, then return the returncode attribute.
---
So in order for you to have dual processing as you seem to be wanting you will have to fire off a second process using Multiprocessing because a Thread, due to GIL, does basically the same thing as Subprocess -- although there are tricks to get a Thread to allow the OS to do something else prior to completing and perhaps the Subprocess can as well but I without looking more closely into this I cannot say for sure. Note I did look into this previously (a while back) for what I am doing and ended up using a combination of Threads and Multiprocessing as if I recall correctly the Subprocess basically works sort of like a Thread due to python's GIL restrictions but did not have the flexibility that a Thread provided me