trepan/lib/thred.py
def map_thread_names():
    '''Invert threading._active'''
    name2id = {}
    for thread_id in list(threading._active.keys()):
        thread = threading._active[thread_id]
        name = thread.getName()
        if name not in list(name2id.keys()):
            name2id[name] = thread_id
            pass
        pass
    return name2id
def map_thread_names():
    '''Invert threading._active'''
    name2id = {}
    for thread_id in list(threading._active.keys()):
        thread = threading._active[thread_id]
        name = thread.getName()
        if name not in list(name2id.keys()):
            name2id[name] = thread_id
            pass
        pass
    return name2id
def map_thread_names ( ) : name2id = { } for thread_id in list ( threading . _active . keys ( ) ) : thread = threading . _active [ thread_id ] name = thread . getName ( ) if name not in list ( name2id . keys ( ) ) : name2id [ name ] = thread_id pass pass return name2id
Invert threading._active
Invert threading . _active