>----Messaggio originale----
>Da: jarod...@libero.it
>Data: 08/09/2014 18.15
>A: <tutor-requ...@python.org>
>Ogg: how to be sure the process are ended
>
>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 
> '#'
>                                                                       break
>                                                               if p1.poll() is 
> not None and p1.poll() != 0:
>                                                                       raise 
> Exception('Error building Alignment using star with hg19 
>database')
>
>
>
>This are not working. How can I do?
>thanks in advance for the precious help
>bw,
>


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to