PyDocs

Python Runtime Services

sys.monitoring

This namespace provides access to the functions and constants necessary to activate and control event monitoring.
Symbols in sys.monitoring

c

clear_tool_id
Unregister all events and callback functions associated with tool_id.

d

DISABLE
A special value that can be returned from a callback function to disable events for the current code location.

f

free_tool_id
Should be called once a tool no longer requires tool_id.

g

get_events
Returns the int representing all the active events.
get_local_events
Returns all the local events for code
get_tool
Returns the name of the tool if tool_id is in use, otherwise it returns None.

m

MISSING
A special value that is passed to a callback function to indicate that there are no arguments to the call.

r

register_callback
Registers the callable func for the event with the given tool_id
restart_events
Enable all the events that were disabled by sys.monitoring.DISABLE for all tools.

s

set_events
Activates all events which are set in event_set.
set_local_events
Activates all the local events for code which are set in event_set.

u

use_tool_id
Must be called before tool_id can be used.