Pastebin

Paste #24134: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

        with open(data_file, 'w') as csvfile:
            fields = ["Timestamp", "Use case", "Action", "Duration"]
            csv_writer = csv.writer(csvfile)
            csv_writer.writerow(fields)
            for uc in use_cases:

                # [...]

                for action, duration in metrics.items():
                    row = [current_time, uc, action, duration]
                    csv_writer.writerow(row)

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.