I am converting a Windows ProComm script into Python and  need help.

;  previous Procomm  script here

run "c:\buy.exe" taskId ; this runs the c:\buy.exe program and assigns the task identification number to the integer variable called "taskId"
pause 1                                      ; wait one second
while taskexists(taskId) exitTask(taskId) ; kills the task
endwhile

; we carry on.... the ProComm    code to completion



How do I do the same in Python?


os.startfile("c:\\buy.exe" , 'OPEN') # THIS WORKS and returns but does not return the taskID

# what do I do now to kill the the Windows program which has finished its work?



_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to