spyder_notebook/utils/nbopen.py
def find_best_server(filename):
    """Find the best server to open a notebook with."""
    servers = [si for si in notebookapp.list_running_servers()
               if filename.startswith(si['notebook_dir'])]
    try:
        return max(servers, key=lambda si: len(si['notebook_dir']))
    except ValueError:
        return None
Find the best server to open a notebook with.
Find the best server to open a notebook with.
Find the best server to open a notebook with .
def find_best_server(filename):
    servers = [si for si in notebookapp.list_running_servers()
               if filename.startswith(si['notebook_dir'])]
    try:
        return max(servers, key=lambda si: len(si['notebook_dir']))
    except ValueError:
        return None
def find_best_server ( filename ) : servers = [ si for si in notebookapp . list_running_servers ( ) if filename . startswith ( si [ 'notebook_dir' ] ) ] try : return max ( servers , key = lambda si : len ( si [ 'notebook_dir' ] ) ) except ValueError : return None
Find the best server to open a notebook with.
Find the best server to open a notebook with .
"""Find the best server to open a notebook with."""
filename