def _print_clean_traceback(einfo):

    extracted = traceback.extract_tb(einfo[2])
    if extracted[-1][0] in ('trace', 'runpy.py'):
        # the error call is coming from inside the house
        # this shouldn't happen, but if it does, do the default behavior
        sys.__excepthook__(sys.exc_info)
    else:
        # remove the traceback levels that relate to runpy or trace
        extracted = [level for level in 
                     extracted if 
                     os.path.basename(level[0]) not in ('command_line.py', 'runpy.py')]
        extracted = traceback.format_list(extracted)
        # print as if it were a normal traceback
        print("Traceback (most recent call last):", file=sys.stderr)
        for level in extracted:
            print(level, end="", file=sys.stderr)
        for line in traceback.format_exception_only(einfo[0], einfo[1]):
            print(line, end="", file=sys.stderr)
Return the socket object used internally.
dataset/ETHPy150Open danrobinson/tracestack/tracestack/command_line.py/_print_clean_traceback--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/telnetlib.py/Telnet.get_socket