def determine_socket(path=default_path):
    sockets = list_sockets(path)

    if not len(sockets):
        return None

    if len(sockets) == 1:
        return os.path.join(path, sockets[0])
    
    try:
        import dialog
        # If we aren't running from within TM use the first socket found.
    except ImportError:
        sock = sockets[0]
    else:
        sock = dialog.menu(sockets)            

    return os.path.join(path, sock)
Returns the accumulated errors.
dataset/ETHPy150Open mattfoster/ipython-tmbundle/Support/lib/ipythonClient.py/determine_socket--crossover with--dataset/ETHPy150Open google/closure-linter/closure_linter/common/errorhandler.py/ErrorHandler.GetErrors