def purge(dir):
    for f in os.listdir(dir):
        if ('massif.out.' in f):
            os.remove(os.path.join(dir, f))
def purge(dir):
    for f in os.listdir(dir):
        if ('massif.out.' in f):
            os.remove(os.path.join(dir, f))