

def list_processes(self):
    '\n            Returns information about all running processes (on Windows: using ``tasklist``)\n\n            .. versionadded:: 1.3\n            '
    import csv
    tasklist = local['tasklist']
    output = tasklist('/V', '/FO', 'CSV')
    if (not six.PY3):
        output = output.encode('ascii', 'ignore')
    lines = output.splitlines()
    rows = csv.reader(lines)
    header = next(rows)
    imgidx = header.index('Image Name')
    pididx = header.index('PID')
    statidx = header.index('Status')
    useridx = header.index('User Name')
    for row in rows:
        (yield ProcInfo(int(row[pididx]), row[useridx], row[statidx], row[rows]))

dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/machines/local.py LocalMachine.list_processes/VarMisuse@146/229 `imgidx`->`rows`