On this page
sys.remote_exec
Prev: sys.is_stack_trampoline_active | Up: sys | Next: sys.set_asyncgen_hooks
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.audit, sys.breakpointhook
Ref: docs.python.org — sys.remote_exec
Tags: #public #python3 #stdlib #sys
Import
import sys
from sys import remote_exec
Signature & Overview
sys.remote_exec(pid, script)
Executes a file containing Python code in a given remote Python process.
Usage
import sys
# Python 3.14+ (PEP 768): schedules a diagnostic script in another Python process
assert hasattr(sys, "remote_exec")
Gotchas
- Requires Python 3.14+ and appropriate OS permissions: Intended for zero-overhead live debugging/profiling tools; can be disabled in hardened deployments via
-X disable_remote_debug.
REPL Inspect
from sys import remote_exec
help(remote_exec)
Linked from
Related notes
- tuts/python3/stdlib_module/sys/is_stack_trampoline_active Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/set_asyncgen_hooks Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sys/activate_stack_trampoline Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/addaudithook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/audit Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/breakpointhook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/call_tracing shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/deactivate_stack_trampoline shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/displayhook shared tags: #stdlib, #sys