def writeDoeLog(dicts, ProductDicts):
    fo = open('./doe.log', 'w')
    numRuns = 1
    for (k, v) in dicts.items():
        if (len(v) > 0):
            print(('%s has %s number of values' % (k, len(v))))
            fo.write(('%s has %s number of values\n' % (k, len(v))))
            numRuns = (numRuns * len(v))
    fo.write(('\nTotal Number of Runs = %s\n\n' % numRuns))
    print(('\nTotal Number of Runs = %s\n\n' % numRuns))
    knobValuesList = []
    knobNamesList = []
    for CurAttrs in ProductAttrs:
        knobValues = []
        knobNames = []
        for (k, v) in CurAttrs.items():
            if (v == 'empty'):
                continue
            else:
                knobNames.append(str(k))
                knobValues.append(str(v))
        knobValuesList.append(knobValues)
        knobNamesList.append(knobNames)
    fo.write((str(knobNamesList[0]) + '\n'))
    for knobSet in knobValuesList:
        fo.write((str(knobSet) + '\n'))
    fo.close()
def writeDoeLog(dicts, ProductDicts):
    fo = open('./doe.log', 'w')
    numRuns = 1
    for (k, v) in dicts.items():
        if (len(v) > 0):
            print(('%s has %s number of values' % (k, len(v))))
            fo.write(('%s has %s number of values\n' % (k, len(v))))
            numRuns = (numRuns * len(v))
    fo.write(('\nTotal Number of Runs = %s\n\n' % numRuns))
    print(('\nTotal Number of Runs = %s\n\n' % numRuns))
    knobValuesList = []
    knobNamesList = []
    for CurAttrs in ProductAttrs:
        knobValues = []
        knobNames = []
        for (k, v) in CurAttrs.items():
            if (v == 'empty'):
                continue
            else:
                knobNames.append(str(k))
                knobValues.append(str(v))
        knobValuesList.append(knobValues)
        knobNamesList.append(knobNames)
    fo.write((str(knobNamesList[0]) + '\n'))
    for knobSet in knobValuesList:
        fo.write((str(knobSet) + '\n'))
    fo.close()