def stat(pid):
    """stat(pid) -> str list

    Args:
      pid (int): PID of the process.

    Returns:
      A list of the values in ``/proc/<pid>/stat``, with the exception that ``(`` and ``)`` has been removed from around the process name.
"""
    with open('/proc/%d/stat' % pid) as fd:
        s = fd.read()
    # filenames can have ( and ) in them, dammit
    i = s.find('(')
    j = s.rfind(')')
    name = s[i+1:j]
    return s[:i].split() + [name] + s[j+1:].split()