On this page
sys.gettrace
Prev: sys.getswitchinterval | Up: sys | Next: sys.getunicodeinternedsize
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.audit, sys.breakpointhook
Ref: docs.python.org — sys.gettrace
Tags: #public #python3 #stdlib #sys
Import
import sys
from sys import gettrace
Signature & Overview
sys.gettrace()
Return the global debug tracing function set with sys.settrace.
Usage
import sys
assert sys.gettrace() is None or callable(sys.gettrace())
Gotchas
- Thread-local: Returns the active debugger/coverage trace function for the current thread (or
None).
REPL Inspect
from sys import gettrace
help(gettrace)
Linked from
Related notes
- tuts/python3/stdlib_module/sys/getswitchinterval Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/getunicodeinternedsize 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