How to find processes from Python
Gary Josack
gary at byoteki.com
Fri Jul 25 23:26:21 EDT 2008
Cameron Simpson wrote:
> On 25Jul2008 11:34, Johny <python at hope.cz> wrote:
> | Is there a way how to find out running processes?E.g. how many
> | Appache's processes are running?
>
> See the popen function and use the "ps" system command.
>
Use of the popen functions is generally discouraged since being
deprecated for the subprocess module.
Look at the subprocess module which will allow you to run processes and
capture the output. The docstrings have good examples for how to use it.
More information about the Python-list
mailing list