Thank you, Alan! I'll try using POPEN. Jerome
--- Alan Gauld <[EMAIL PROTECTED]> wrote: > > I'm trying to start a shell script with 4 > arguments > > from my python script. I'm having problems trying > to > > figure out the best way to do this. > > Use a format string: > > cmd = "myscript %s %s %s %s" > os.system(cmd % (p1,p2,p3,p4)) > > OR > > cmdstr = cmd % p1,p2,p3,p4 > os.system(cmdstr) > > The second form is easier to debug... > > > to use popen3 to keep track of stdin, stdout, and > err, > > Ok, substitute popen3 for system(). > Or better still use the subprocess module and > the Popen class. > > See the OS topic in my tutor for more on the > subprocess > module. > > Alan Gauld > Author of the Learn to Program web site > http://www.freenetpages.co.uk/hp/alan.gauld > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor