Ignore:
Timestamp:
19/02/08 16:22:40 (12 years ago)
Author:
ckilburn
Message:

delimiter changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/na_file/na_file_2010.py

    r3446 r3461  
    6464 
    6565        for i in range(self.NIV - 1): 
    66             X_lines.append(((self.float_format + self.delimiter) * self.NXDEF[i] + "\n") % tuple(self.X[i + 1][0:self.NXDEF[i]])) 
     66            X_lines.append((self.format * self.NXDEF[i] % tuple(self.X[i + 1][0:self.NXDEF[i]])).rstrip(" ,") + "\n") 
    6767 
    6868        X_lines.reverse() 
     
    128128        # Set up unbounded IV loop 
    129129        self.NX.reverse() 
    130         print "self.V is", self.V 
    131130        for m in range(len(self.X[0])): 
    132             # Write slower varying independent variable mark and auxiliary variables 
    133             var_string = self.float_format % self.X[0][m] 
     131 
     132            # Write unbounded independent variable mark and auxiliary variables 
     133            var_string = self.format % self.X[0][m] 
    134134 
    135135            for a in range(self.NAUXV): 
    136                 var_string = var_string + ((self.delimiter + self.float_format) % self.A[a][m]) 
    137             self.file.write("%s\n" % var_string) 
     136                var_string = var_string + (self.format % self.A[a][m]) 
     137            self.file.write("%s\n" % var_string.rstrip(" ,")) 
    138138             
    139139            # Write Variables 
    140140            for n in range(self.NV): 
    141                 print "V[n][m] is %s" % self.V[n][m] 
    142141                outlines = nappy.utils.list_manipulator.recursiveListWriter(self.V[n][m], self.NX, delimiter = self.delimiter, float_format = self.float_format) 
    143                 print "outlines is", outlines 
    144142                for line in outlines: 
    145143                    self.file.write(line) 
Note: See TracChangeset for help on using the changeset viewer.