Python and Unix Commands

Adriaan Renting renting at astron.nl
Mon Sep 19 05:20:35 EDT 2005


Depending on what you axactly want there are a lot of ways to do this.
There is the subProcess module, there is the pty module, there is os.system, there is the popen module,
and my personal favorite is Pexpect (pexpect.sourceforge.org). Read the documentation of these modules is my first suggestion.

Adriaan Renting.

P.S. you don't need to post your question to this list every 5 minutes.
 
 
|>>>"timdoyle05" <timdoyle05 at yahoo.com> 09/19/05 10:46 am >>> 
|Hi, 
| 
|  I have a question relating to how Unix commands can be issued from 
|Python programs. Im am currently writing a large test script in python 
|and I need this script to call three other separate Python scripts, 
|where each one executes in it own thread of control. I would like to 
|use a Unix command to get each script to run in its own shell. I have 
|tried using the "Commands" module but after I issue the 
|first "command", execution blocks until I kill the called script. Is 
|there a way around this?? 
| 
|Thanks for your time, 
|I would really appreciate any assistance, 
| 
|Tim. 
| 
| 
| 
|-- 
|http://mail.python.org/mailman/listinfo/python-list 




More information about the Python-list mailing list