code: def save(self, filename):
          '''save fence points to a file'''
          f = open(filename, mode='w')
          for p in self.rally_points:
              f.write("RALLY %f\t%f\t%f\t%f\t%f\t%d\n" % (p.lat * 1e-7, p.lng * 1e-7, p.alt,
                                                          p.break_alt, p.land_dir, p.flags))
          f.close(f save(self, filename):
          '''save fence points to a file'''
          f = open(filename, mode='w')
          for p in self.rally_points:
              f.write("RALLY %f\t%f\t%f\t%f\t%f\t%d\n" % (p.lat * 1e-7, p.lng * 1e-7, p.alt,
                                                          p.break_alt, p.land_dir, p.flags))
          f.close()
docs: save fence points to a file