Python Forum

Full Version: python os.popen is not working for wait method
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to automate some manual steps using python, i am opening new command prompt using os.popen and running docker compose up .. its opening new cmd and running the docker command, now i want run the next set of commands after docker command is up ... python script has to wait till that time, i tried with below code but its not working. I tried with subprocess.Popen which has wait method but its not opening new cmd,it is running in python script running command prompt only .. p=os.popen("Start cmd /K docker-compose up") p.wait