Example #1
0
 def __init__(self, fp, **kwargs):
     BaseFormat.__init__(self, fp, **kwargs)
     if PY2:
         reader = csv.reader(fp, delimiter=self.delimiter,
                             encoding=DEFAULT_ENCODING)
     else:
         reader = csv.reader(fp, delimiter=self.delimiter)
     self.data = [row for row in reader]
Example #2
0
 def __init__(self, fp, **kwargs):
     BaseFormat.__init__(self, fp, **kwargs)
     if PY2:
         reader = csv.reader(fp, delimiter=self.delimiter,
                             encoding=DEFAULT_ENCODING)
     else:
         reader = csv.reader(fp, delimiter=self.delimiter)
     self.data = [row for row in reader]
Example #3
0
 def __init__(self, fname):
     super(DelimitedFormat, self).__init__(fname)
     with open(fname, 'r') as fp:
         if PY2:
             reader = csv.reader(fp, delimiter=self.delimiter,
                                 encoding=DEFAULT_ENCODING)
         else:
             reader = csv.reader(fp, delimiter=self.delimiter)
         self.data = [row for row in reader]
Example #4
0
 def __init__(self, fname):
     super(DelimitedFormat, self).__init__(fname)
     with open(fname, 'r') as fp:
         if PY2:
             reader = csv.reader(fp,
                                 delimiter=self.delimiter,
                                 encoding=DEFAULT_ENCODING)
         else:
             reader = csv.reader(fp, delimiter=self.delimiter)
         self.data = [row for row in reader]