As title mentioned, i wan check the process of a application.

What i wan is like tat:

When i start a process A, then the process A completed, process B will start after that. Once the process B started, then the script will start execute next step. Thanks for help.

The logic something like tat,

IF process B in Process(task manager):
do something....

9 Years
Discussion Span
Last Post by jlm699

In windows use tasklist , and in linux us ps . In either case, you'll need to search/grep out your process's name to see if it's running

import os

run this script and Get jlm699's flavour

Yes, both tasklist and ps are command line executables in their respective OS. They print out a list of all the running processes. It will still be up to you to read the return and search for your program unless you know how to use grep. Although I'm not sure if windows has a grep-like feature. I'd assume no

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.