Cross-platform way to get PIDs by process name in python
What is the cross-platform way to get PIDs by process name in python?

 1. I can't parse /proc because it might be unavialable (on HP-UX).
 2. I do not want to run os.system('ps') or os.system('tasklist') and patse output because I think it is ugly (field squence may be different in different OS).
 3. Target platforms are Solaris, HP-UX, Win32 and maybe others.
Cross-platform way to get PIDs by process name in python
===

What is the cross-platform way to get PIDs by process name in python?

 1. I can't parse /proc because it might be unavialable (on HP-UX).
 2. I do not want to run os.system('ps') or os.system('tasklist') and patse output because I think it is ugly (field squence may be different in different OS).
 3. Target platforms are Solaris, HP-UX, Win32 and maybe others.