How to use the shellingham.posix.ps._parse_ps_header function in shellingham

To help you get started, we’ve selected a few shellingham examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sarugaku / shellingham / tests / test_ps.py View on Github external
def test_parse_ps_header():
    header = '   UID   PID  PPID CPU PRI NI      VSZ    TIME COMMAND'
    parsed = dict(_parse_ps_header(header))
    assert parsed == {
        'UID': slice(0, 6),
        'PID': slice(6, 12),
        'PPID': slice(12, 18),
        'CPU': slice(18, 22),
        'PRI': slice(22, 26),
        'NI': slice(26, 29),
        'VSZ': slice(29, 38),
        'TIME': slice(38, 46),
        'COMMAND': slice(46, None),
    }

shellingham

Tool to Detect Surrounding Shell

ISC
Latest version published 1 year ago

Package Health Score

81 / 100
Full package analysis

Similar packages