Home | Trees | Indices | Help |
---|
|
>>> cur = os.getpid() >>> exe = sys.executable >>> pids = getPids() >>> pids > 1 True >>> isinstance(pids[0], (int, long)) True >>> cur in pids True
>>> mapping = getPidNames() >>> cur in mapping True >>> mapping[cur].lower() in sys.executable True
>>> getPidDetails('self')['name'] == getPidDetails(cur)['name'] True >>> getPidDetails(cur)['name'] == mapping[cur] True
|
|||
|
LinuxProcReader Get process informations under Linux by reading /proc |
||
|
WinEnumProcesses ""Get process informations under Win32 with psapi.dll |
|
|||
|
_plat(S,
prefix,
start=...,
end=...) Return True if S starts with the specified prefix, False otherwise. |
||
|
getPids() Get a list of pids |
||
|
getPidNames() Get a list of pid -> name |
||
|
getPidDetails(pid) Get detailed informations about a process |
|
|||
|
__author__ = 'Christian Heimes'
|
||
|
__version__ = '$Id: processinfo.py 125 2007-02-02 17:59:04Z tiran $'
|
||
|
__revision__ = '$Revision: 125 $'
|
||
|
LOG = <logging.Logger instance at 0x403084ec>
|
||
|
PLAT = 'linux'
|
||
|
PSAPI = windll.psapi
|
||
|
KERNEL = windll.kernel32
|
||
|
PROCESS_QUERY_INFORMATION = 0x0400
|
||
|
PROCESS_VM_READ = 0x0010
|
||
|
PROCESS_FLAGS = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ
|
||
|
NULL = '\x00'
|
||
|
_enumProcesses = <moul.osdependent.processinfo.LinuxProcReader object...
|
|
|
|
|
|
|
__author__None
|
__version__None
|
__revision__None
|
LOGNone
|
PLATNone
|
PSAPINone
|
KERNELNone
|
PROCESS_QUERY_INFORMATIONNone
|
PROCESS_VM_READNone
|
PROCESS_FLAGSNone
|
NULLNone
|
_enumProcessesNone
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Sun Feb 4 17:00:18 2007 | http://epydoc.sourceforge.net |