summaryrefslogtreecommitdiffstats
path: root/eteutils/csvLibrary.py
blob: b38b4a580de9322dcb58990fc7e1f627f027b3f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import csv
class csvLibrary(object):

    def read_csv_file(self, filename):
        '''This creates a keyword named "Read CSV File"

        This keyword takes one argument, which is a path to a .csv file. It
        returns a list of rows, with each row being a list of the data in 
        each column.
        '''
        data = []
        with open(filename, 'rb') as csvfile:
            reader = csv.reader(csvfile)
            for row in reader:
                data.append(row)
        return data