In [ ]:
import csv
output = "Desktop/data.csv"
f = open("Desktop/mpe.txt", "r")
sections = f.read().split("*************************************************")

for section in sections:
    for line in section.split("\n"):
        if 'SEND_HTTP' in line:
            date = line[:10]
            if 'FAILURE' in line:
                status = 'Failure'
            else:
                status = 'Success'
        if 'HTTPMessageResponse' in line:
            response = line

    with open(output, "a") as fp:
         wr = csv.writer(fp, dialect='excel')
         wr.writerow([date, status, response])