def csvsave(self, CSVFILE):
        """Save measurements in CSV format to the passed-in file object"""
        counter_triples = []
        for kind in self._results.iterkeys():
            for inst in self._results[kind].iterkeys():
                for counter in self._results[kind][inst].iterkeys():
                    counter_triples.append((kind, inst, counter))
        kind,inst,counter = counter_triples[0]
        tick_count = len(self._results[kind][inst][counter])
        csv_writer = csv.writer(CSVFILE)
        csv_writer.writerow(["\\%s\\%s" % (interfacename(kind,inst), counter)
                             for kind,inst,counter in counter_triples])
        for tick_index in xrange(tick_count):
            csv_writer.writerow([self._results[kind][inst][counter][tick_index]
                                 for kind,inst,counter in counter_triples])
Save measurements in CSV format to the passed-in file object
recipes/Python/303338_Helper_subclass/recipe-303338.py