Orographic Gage File Write to File Method

def _write(self, session, openFile, replaceParamFile):
        """
        Orographic Gage File Write to File Method
        """
        # Write lines
        openFile.write('Num_Sites:    %s\n' % self.numSites)
        openFile.write('Elev_Base     %s\n' % self.elevBase)
        openFile.write('Elev_2        %s\n' % self.elev2)
        openFile.write('Year    Month   Day     Hour    Temp_2\n')

        # Retrieve OrographicMeasurements
        measurements = self.orographicMeasurements

        for measurement in measurements:
            dateTime = measurement.dateTime
            openFile.write('%s%s%s%s%s%s%s%s%.3f\n' % (
                dateTime.year,
                '    ',
                dateTime.month,
                ' ' * (8 - len(str(dateTime.month))),
                dateTime.day,
                ' ' * (8 - len(str(dateTime.day))),
                dateTime.hour,
                ' ' * (8 - len(str(dateTime.hour))),
                measurement.temp2))