John wrote: > I have the exact same situation, but system doesn't seem to wait. Here > is my pseudo code: > > for i in attempts: #attempts holds strings of shellscripts > cmd="%s which runs many different shell scripts and takes about > an hour" % (i) > os.system(cmd) > #debugging > print "Finished with %s" % (i) > raw_input("More debugging, shouldn't see this until shell > scripts are finished!") > > > But it prints the print statement and waits for raw_input instantly... > Any thoughts? >
Have you tried os.spawnl(...) with mode os.P_WAIT ? > > > On 10/27/07, *Eric Walker* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > disregard this one. I found the answer. I was using spawn instead > of os.system. > > Thanks. > > > ----- Original Message ---- > From: Eric Walker < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > To: tutor@python.org <mailto:tutor@python.org> > Sent: Saturday, October 27, 2007 9:55:05 AM > Subject: [Tutor] system call > > Hello, > I am trying to run a timing script but I need the python program to > stop and wait for the executable to finish. Does anyone have any > examples of doing this? > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor