Your Python process is running and you need to poke it — flush a buffered log, dump a stack trace, change a variable, enable a debugger — without restarting it.
CPython is just a C program, so gdb can attach and call its C API. Two calls do
everything: PyGILState_Ensure() grabs the GIL, PyRun_SimpleString() runs any
Python one-liner inside the process.