Re: [Tutor] Understand subprocess poll

2014-09-09 Thread jarod...@libero.it
l> > >-- > >Message: 2 >Date: Tue, 9 Sep 2014 09:14:39 -0400 >From: leam hall >To: tutor >Subject: Re: [Tutor] Good approach regarding classes attributes >Message-ID: > >Content-Type: text/plain; charset=UTF-8 > >On Tu

Re: [Tutor] Understand subprocess poll

2014-09-09 Thread Peter Otten
Wolfgang Maier wrote: > On 09/09/2014 11:45 AM, Peter Otten wrote: >> jarod...@libero.it wrote: >> >>> I want to use subprocess for run some programs But I need to be sure the >>> program end before continue with the other: >>> >>> subprocess.call("ls") >>> cmd1 = i >>> p1 = subprocess.Popen(cmd1,

Re: [Tutor] Understand subprocess poll

2014-09-09 Thread Wolfgang Maier
On 09/09/2014 11:45 AM, Peter Otten wrote: jarod...@libero.it wrote: I want to use subprocess for run some programs But I need to be sure the program end before continue with the other: subprocess.call("ls") cmd1 = i p1 = subprocess.Popen(cmd1,shell=True,stdout=subprocess.PIPE) while True: if

Re: [Tutor] Understand subprocess poll

2014-09-09 Thread Peter Otten
jarod...@libero.it wrote: > I want to use subprocess for run some programs But I need to be sure the > program end before continue with the other: > > subprocess.call("ls") > cmd1 = i > p1 = subprocess.Popen(cmd1,shell=True,stdout=subprocess.PIPE) > > while True: > if p1.poll() is None: > time.s

[Tutor] Understand subprocess poll

2014-09-09 Thread jarod...@libero.it
Dear all!! I want to use subprocess for run some programs But I need to be sure the program end before continue with the other: subprocess.call("ls") cmd1 = i p1 = subprocess.Popen(cmd1,shell=True,stdout=subprocess.PIPE) while True: if p1.poll() is None: time.sleep(3) pass if p1.poll()==0: print