Python Forum
Use subprocess.Popen and time.sleep
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use subprocess.Popen and time.sleep
#1
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
Reply


Messages In This Thread
Use subprocess.Popen and time.sleep - by chucky831 - Aug-11-2022, 03:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Understanding subprocess.Popen Pedroski55 6 294 May-12-2024, 10:46 AM
Last Post: Pedroski55
Information subprocess.Popen() suddenly giving me grief? davecotter 3 681 Dec-13-2023, 10:49 PM
Last Post: davecotter
  How to immediately kill and restart a thread while using a time.sleep() inside it? philipbergwerf 4 3,611 Feb-07-2022, 04:16 PM
Last Post: Gribouillis
  Subprocess.Popen() not working when reading file path from csv file herwin 13 15,402 May-07-2021, 03:26 PM
Last Post: herwin
  Did subprocess.Popen() causes main routine to pause stdout? liudr 4 3,716 May-04-2021, 08:58 PM
Last Post: liudr
  Time.sleep: stop appending item to the list if time is early quest 0 1,906 Apr-13-2021, 11:44 AM
Last Post: quest
  disable subprocess.popen prompt echo paul18fr 1 2,059 Feb-04-2021, 02:50 AM
Last Post: Larz60+
  Can you end the Time.sleep function boier96 9 9,695 Jan-16-2021, 10:09 PM
Last Post: Serafim
  how to pass the interactive string to Popen subprocess maiya 1 1,913 Sep-18-2020, 09:36 PM
Last Post: Larz60+
  How to get program output from subprocess.Popen? glestwid 1 2,407 Aug-19-2020, 05:44 AM
Last Post: buran

Forum Jump:

User Panel Messages

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