faulthandler.unregister()

faulthandler.unregister(signum) Unregister a user signal: uninstall the handler of the signum signal installed by register(). Return True if the signal was registered, False otherwise. Not available on Windows.

faulthandler.register()

faulthandler.register(signum, file=sys.stderr, all_threads=True, chain=False) Register a user signal: install a handler for the signum signal to dump the traceback of all threads, or of the current thread if all_threads is False, into file. Call the previous handler if chain is True. The file must be kept open until the signal is unregistered by unregister(): see issue with file descriptors. Not available on Windows. Changed in version 3.5: Added support for passing file descriptor to this

faulthandler.is_enabled()

faulthandler.is_enabled() Check if the fault handler is enabled.

faulthandler.enable()

faulthandler.enable(file=sys.stderr, all_threads=True) Enable the fault handler: install handlers for the SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL signals to dump the Python traceback. If all_threads is True, produce tracebacks for every running thread. Otherwise, dump only the current thread. The file must be kept open until the fault handler is disabled: see issue with file descriptors. Changed in version 3.5: Added support for passing file descriptor to this function.

faulthandler.dump_traceback_later()

faulthandler.dump_traceback_later(timeout, repeat=False, file=sys.stderr, exit=False) Dump the tracebacks of all threads, after a timeout of timeout seconds, or every timeout seconds if repeat is True. If exit is True, call _exit() with status=1 after dumping the tracebacks. (Note _exit() exits the process immediately, which means it doesn’t do any cleanup like flushing file buffers.) If the function is called twice, the new call replaces previous parameters and resets the timeout. The timer

faulthandler.dump_traceback()

faulthandler.dump_traceback(file=sys.stderr, all_threads=True) Dump the tracebacks of all threads into file. If all_threads is False, dump only the current thread. Changed in version 3.5: Added support for passing file descriptor to this function.

faulthandler.disable()

faulthandler.disable() Disable the fault handler: uninstall the signal handlers installed by enable().

faulthandler.cancel_dump_traceback_later()

faulthandler.cancel_dump_traceback_later() Cancel the last call to dump_traceback_later().

False

False The false value of the bool type. Assignments to False are illegal and raise a SyntaxError.

exit

exit(code=None) Objects that when printed, print a message like “Use quit() or Ctrl-D (i.e. EOF) to exit”, and when called, raise SystemExit with the specified exit code.