Tutorial slides (PDF) - Clemson University
Tutorial slides (PDF) - Clemson University
Tutorial slides (PDF) - Clemson University
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Subprocess<br />
The subprocess module allows the Python interpreter to<br />
spawn and control processes. It is unaffected by the GIL. Using<br />
the subprocess.Popen() call, one may start any process<br />
you'd like.<br />
>>> pi=subprocess.Popen('python -c "import math; print<br />
math.pi"',shell=True,stdout=subprocess.PIPE)<br />
>>> pi.stdout.read()<br />
'3.14159265359\n'<br />
>>> pi.pid<br />
1797<br />
>>> me.wait()<br />
0<br />
It goes without saying, there's better ways to do<br />
subprocesses...