Python Forum
How to make app run only when process is aviable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make app run only when process is aviable
#1
Hi ! So i have script and i want it to run only when game process is aviable how do i make it.
Reply
#2
What is game process ?

If you want to check executable exists, for example ls

from shutil import which

# check ls exists
cmd = which("ls")
if cmd:
    print("ls available, path:", cmd)
else:
    print("ls not available")
Output:
ls available, path: /bin/ls
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to make a simple automation process of login using "if condition" soimba 3 2,765 Jan-07-2020, 11:58 PM
Last Post: SheeppOSU
  How to sharing object between multiple process from main process using Pipe Subrata 1 3,679 Sep-03-2019, 09:49 PM
Last Post: woooee

Forum Jump:

User Panel Messages

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