treetool.py
def read_names(filename):
    """File with name "filename" assumed to contain one leafname per line. Read and return set of names"""

    names = set()
    with open(filename, "r") as infile:
        for line in infile:
            leaf = line.strip()
            if leaf:
                names.add(leaf)
    return names
File with name "filename" assumed to contain one leafname per line. Read and return set of names
File with name "filename" assumed to contain one leafname per line. Read and return set of names
File with name " filename " assumed to contain one leafname per line . Read and return set of names
def read_names(filename):
    names = set()
    with open(filename, "r") as infile:
        for line in infile:
            leaf = line.strip()
            if leaf:
                names.add(leaf)
    return names
def read_names ( filename ) : names = set ( ) with open ( filename , "r" ) as infile : for line in infile : leaf = line . strip ( ) if leaf : names . add ( leaf ) return names
File with name "filename" assumed to contain one leafname per line.
File with name " filename " assumed to contain one leafname per line .
"""File with name "filename" assumed to contain one leafname per line. Read and return set of names"""
filename