(func)
Set a trace function for all threads started from the threading module.

    The func will be passed to sys.settrace() for each thread, before its run()
    method is called.
Set a trace function for all threads started from the threading module.
Set a trace function for all threads started from the threading module .
def settrace(func):
    """Set a trace function for all threads started from the threading module.

    The func will be passed to sys.settrace() for each thread, before its run()
    method is called.

    """
    global _trace_hook
    _trace_hook = func
def settrace ( func ) : global _trace_hook _trace_hook = func