Does anyone have any examples of using the subprocess module to pass objects into a slave script and then get the results back to the parent script?
I've seen some examples which pass file paths (as strings) into the slave script, but I really need to have the slave script manipulate numpy arrays declared in the parent script, then pass the results back out again (again as numpy arrays). Is this possible?
If anyone is interested - here's an update of my os.spwanv psudo-parallel process method but now ***new and improved***using the subprocess module and better/fancier coding methods. It doesn't include any robust method (other than simple strings and return codes) of comunicating between parent and child processes but it could be altered to do that using the provided subprocess.Popen object (I guess via the .stdin method?). I'd be super happy to have someone smart show me how to elaborate on my simple example to include fancy stuff like handing numpy arrays to the child process or sending dictionary objects back to the parent script - something fancy like that! I am not there yet, but will probably have the need to do this eventually. For now it's a first stab and accomplishes what I need it to do...