Python and Unix Commands
Piet van Oostrum
piet at cs.uu.nl
Mon Sep 19 06:46:42 EDT 2005
>>>>> "timdoyle05" <timdoyle05 at yahoo.com> (T) wrote:
>T> Hi,
>T> I have a question relating to how Unix commands can be issued from
>T> Python programs. Im am currently writing a large test script in python
>T> and I need this script to call three other separate Python scripts,
>T> where each one executes in it own thread of control. I would like to
>T> use a Unix command to get each script to run in its own shell. I have
>T> tried using the "Commands" module but after I issue the
>T> first "command", execution blocks until I kill the called script. Is
>T> there a way around this??
Use the subprocess module. If you have an older python, you could use
os.system(command + "&") or install the subprocess module yourself.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list