This is a development version (latest) and may be unstable.Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython latest / IPython / core / kitty / _ancestor_process_names

function

IPython.core.kitty:_ancestor_process_names

source: /IPython/core/kitty.py:89

Signature

def _ancestor_process_names() → Iterator[str]

Summary

Yield the names of this process' ancestors, nearest first.

Extended Summary

On Linux this reads /proc directly: importing psutil costs upwards of 10ms, which is a real slice of IPython's startup, and this runs on every interactive start. /proc/<pid>/stat holds both the name psutil would report and the parent pid, so one read per ancestor is enough.

Everywhere else -- macOS, or a Linux without /proc -- fall back to psutil, which IPython depends on anyway.

Aliases

  • IPython.core.kitty._ancestor_process_names