Python and command line

Carlis

Senior member
May 19, 2006
237
0
76
Hi

I am wondering, can you access the command line from a python program? I am developing some simulation software that I want to be able to run on solaris osx and linux, and the scripting part is a little to much to be done with the usual script.sh route...

Best regards, Carlis

 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Yes. Look at the following to get started:

os.system()
os.popen()
os.popen2() ... and 3, and 4
 

tfinch2

Lifer
Feb 3, 2004
22,114
1
0
Originally posted by: degibson
Yes. Look at the following to get started:

os.system()
os.popen()
os.popen2() ... and 3, and 4

I'd skip over those. Just use subprocess.