def isdicsimilar(dic1, dic2, verb=False, dtol=DTOL, ignore_pipe_display=False):
    # create copies of the two dictionaries
    dic1 = dict(dic1)
    dic2 = dict(dic2)

    # set return value to True
    r = True

    # create sets
    kset1 = set(dic1.keys())
    kset2 = set(dic2.keys())
    dset = set.difference(kset1, kset2)
    iset = set.intersection(kset1, kset2)

    if ignore_pipe_display is True:
        iset.discard('FDMIN')
        iset.discard('FDMAX')
        iset.discard('FDDISPMIN')
        iset.discard('FDDISPMAX')
        iset.discard('FDSCALEFLAG')

    # print out any keys not in both dictionaries
    if len(dset) != 0:
        r = False
        if verb:
            print("Keys not in both dictionaries:", dset)

    # loop over keys in both sets
    for k in iset:
        v1, v2 = dic1[k], dic2[k]

        if not isitemsimilar(v1, v2, verb=verb, dtol=dtol):
            print("For key:", k)
            r = False

    return r
Compare two dictionaries for differences
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/util/misc.py/isdicsimilar