A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/350594.html below:

Python and Unix Commands

Python and Unix Commands Python and Unix CommandsPiet 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4