faulthandler - faulthandler module.
| Use Case | Command | Description |
|---|---|---|
| Enable fault handler | enable() | Enable the fault handler to dump tracebacks on crash or signal |
| Dump traceback | dump_traceback() | Dump traceback of current or all threads to a file |
| Dump traceback later | dump_traceback_later() | Schedule a traceback dump after a timeout, optionally repeating |
| Disable fault handler | disable() | Disable the fault handler |
| Check if enabled | is_enabled() | Return True if the fault handler is enabled |
| Register signal handler | register() | Register a handler for a specific signal |
| Unregister signal handler | unregister() | Unregister a previously registered signal handler |
cancel_dump_traceback_later() — cancel the previous call to dump_traceback_later().disable() — disable the fault handlerdump_traceback(file=sys.stderr, all_threads=True) — dump the traceback of the current thread, or of all threads if all_threads is True, into filedump_traceback_later(timeout, repeat=False, file=sys.stderr, exit=False) — dump the traceback of all threads in timeout seconds, or each timeout seconds if repeat is True. If exit is True, call _exit(1) which is not safe.enable(file=sys.stderr, all_threads=True) — enable the fault handleris_enabled() → bool — check if the handler is enabledregister(signum, file=sys.stderr, all_threads=True, chain=False) — register a handler for the signal 'signum': dump the traceback of the current thread, or of all threads if all_threads is True, into fileunregister(signum) — unregister the handler of the signal 'signum' registered by register()(built-in)
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-01 17:06 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)