changeset 80:8bfa28ff74ce

use that thing we made
author Jeff Hammel <k0scist@gmail.com>
date Sun, 01 Mar 2015 09:29:38 -0800
parents c70ef55b6141
children 202ab51601b4
files numerics/read.py numerics/write.py
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/numerics/read.py	Sun Mar 01 09:19:25 2015 -0800
+++ b/numerics/read.py	Sun Mar 01 09:29:38 2015 -0800
@@ -10,7 +10,7 @@
 import csv
 import os
 import sys
-
+from .write import CSVWriter
 
 # module globals
 __all__ = ['main', 'CSVParser']
@@ -154,9 +154,9 @@
     data = parser.read()
 
     # write CSV
-    writer = csv.writer(options.output)
-    for row in data:
-        writer.writerow(row)
+    writer = CSVWriter(options.output)
+    writer.write(data)
+
 
 if __name__ == '__main__':
     main()
--- a/numerics/write.py	Sun Mar 01 09:19:25 2015 -0800
+++ b/numerics/write.py	Sun Mar 01 09:29:38 2015 -0800
@@ -24,7 +24,7 @@
         self.f = f
         self.writer = csv.writer(f)
 
-    def writerow(*row):
+    def writerow(self, *row):
         self.writer.writerow(row)
         self.f.flush()
     __call__ = writerow