Changeset 359


Ignore:
Timestamp:
29/11/04 11:40:30 (15 years ago)
Author:
astephen
Message:

Fixed a bug so that X values in the header are now ordered correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/naFile2010.py

    r349 r359  
    5959        self.file.write(("%s "*(self.NIV-1)+"\n") % tuple(self.NXDEF)) 
    6060        self.NXDEF.reverse() 
     61        X_lines=[] 
    6162        for i in range(self.NIV-1): 
    6263            #print (self.floatFormat+self.spacer)*self.NXDEF[i]+"\n", self.NXDEF, self.X[i+1][0:self.NXDEF[i]] 
    63             self.file.write(((self.floatFormat+self.spacer)*self.NXDEF[i]+"\n") % tuple(self.X[i+1][0:self.NXDEF[i]]))             
     64            X_lines.append(((self.floatFormat+self.spacer)*self.NXDEF[i]+"\n") % tuple(self.X[i+1][0:self.NXDEF[i]])) 
     65        X_lines.reverse() 
     66        for line in X_lines: 
     67            self.file.write(line.lstrip()) 
    6468        self.XNAME.reverse() 
    6569        self.file.write("%s\n"*self.NIV % tuple(self.XNAME)) 
Note: See TracChangeset for help on using the changeset viewer.