Python Forum
python os.popen is not working for wait method
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python os.popen is not working for wait method
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom method to handle exceptions not working as expected gradlon93 3 1,014 Dec-22-2022, 07:12 PM
Last Post: deanhystad
  Python multiprocessing Pool apply async wait for process to complete sunny9495 6 6,388 Apr-02-2022, 06:31 AM
Last Post: sunny9495
  Wait til a date and time KatManDEW 2 1,413 Mar-11-2022, 08:05 PM
Last Post: KatManDEW
  wait for the first of these events Skaperen 4 1,930 Mar-07-2022, 08:46 PM
Last Post: Gribouillis
  how to do a two-way wait Skaperen 2 1,258 Mar-04-2022, 02:31 AM
Last Post: Skaperen
  Subprocess.Popen() not working when reading file path from csv file herwin 13 14,964 May-07-2021, 03:26 PM
Last Post: herwin
  Run an app in a standalone terminal and wait until it's closed glestwid 2 2,504 Aug-30-2020, 08:14 AM
Last Post: glestwid
  remove elements method not working spalisetty06 4 2,459 Aug-13-2020, 01:17 PM
Last Post: deanhystad
  Wait for command within a process bRitch022 1 3,232 Jul-15-2020, 07:03 PM
Last Post: bRitch022
  Polymorphism not working with a call to a abstract method colt 3 2,316 Nov-04-2019, 11:04 PM
Last Post: colt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020