Python Forum

Full Version: Use subprocess.Popen and time.sleep
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good morning everyone, I am new to Python. I am developing a script to automate a program I need at work. What I need to do via Python is simply open a program that is in the system. To do this I used subprocess.Popen()
The problem is that my script should not continue until the program has fully opened. How can I go about stopping the script? I have tried using time.sleep() but using this function seems to then fail to use subprocess.terminate() to close the program. Can you help me with this? Thanks
How do you know the process has "fully opened"? I don't know what it means to be "fully opened".
Hi,

Post some of your code and the error messages you are getting, so we can try tu understand better how to help you.