コード例 #1
0
def print_near_match(material, material_library):
    list_of_matches = []
    for item in material_library.iterkeys():
        if (material.lower() in item.lower()) or (material.upper() in item.upper()):
            print("Near matches to %s are :" % material)
            print item
        list_of_matches.append(item)
    return list_of_matches
コード例 #2
0
ファイル: uwuw_preproc.py プロジェクト: ejwilson3/DAGMC
def print_near_match(material, material_library):
    """ 
    function to print near matches to material name
    material_library : PyNE material library
    """
    list_of_matches = []
    for item in material_library.iterkeys():
        if (material.lower() in item.lower()) or (material.upper() in item.upper()):
            print("Near matches to %s are :" % material)
            print item
        list_of_matches.append(item)
    return list_of_matches
コード例 #3
0
def print_near_match(material, material_library):
    for item in material_library.iterkeys():
        if (material.lower() in item.lower()) or (material.upper() in item.upper()):
            print "near matches to ", material, " are "
            print item
    return