Compound supplier from CTAB text file (.mol, .sdf)

def mols_from_file(path, no_halt=True, assign_descriptors=True):
    """Compound supplier from CTAB text file (.mol, .sdf)"""
    with open(path, 'rb') as f:
        fd = (tx.decode(line) for line in f)
        for c in mol_supplier(fd, no_halt, assign_descriptors):
            yield c