kolibri/utils/pskolibri/_pswindows.py
def pids():
    """Returns a list of PIDs currently running on the system."""
    length = 4096
    PID_SIZE = ctypes.sizeof(wintypes.DWORD)
    while True:
        pids = (wintypes.DWORD * length)()
        cb = ctypes.sizeof(pids)
        cbret = wintypes.DWORD()
        psapi.EnumProcesses(pids, cb, ctypes.byref(cbret))
        if cbret.value < cb:
            length = cbret.value // PID_SIZE
            return list(pids[:length])
        length *= 2
Returns a list of PIDs currently running on the system.
Returns a list of PIDs currently running on the system.
Returns a list of PIDs currently running on the system .
def pids():
    length = 4096
    PID_SIZE = ctypes.sizeof(wintypes.DWORD)
    while True:
        pids = (wintypes.DWORD * length)()
        cb = ctypes.sizeof(pids)
        cbret = wintypes.DWORD()
        psapi.EnumProcesses(pids, cb, ctypes.byref(cbret))
        if cbret.value < cb:
            length = cbret.value // PID_SIZE
            return list(pids[:length])
        length *= 2
def pids ( ) : length = 4096 PID_SIZE = ctypes . sizeof ( wintypes . DWORD ) while True : pids = ( wintypes . DWORD * length ) ( ) cb = ctypes . sizeof ( pids ) cbret = wintypes . DWORD ( ) psapi . EnumProcesses ( pids , cb , ctypes . byref ( cbret ) ) if cbret . value < cb : length = cbret . value // PID_SIZE return list ( pids [ : length ] ) length *= 2
Returns a list of PIDs currently running on the system.
Returns a list of PIDs currently running on the system .
"""Returns a list of PIDs currently running on the system."""