示例#1
0
    def testTableScan(self):
        table = TableScan(['XPos', 'YPos'], [['1', '2'], ['3', '4']])
        filename = '/tmp/spreadsheet.csv'
        table.save(filename)

        table2 = loadTableScan(filename)
        print table
        self.assertEqual(table.headers, table2.headers)
        self.assertEqual(table.rows, table2.rows)

        os.remove(filename)
示例#2
0
    def testTableScan(self):
        table = TableScan([ 'XPos', 'YPos' ], [ [ '1', '2' ], [ '3', '4' ] ] )
        filename = '/tmp/spreadsheet.csv'
        table.save(filename)
        
        table2 = loadTableScan(filename)
        print table
        self.assertEqual(table.headers, table2.headers)
        self.assertEqual(table.rows, table2.rows)

        os.remove(filename)
示例#3
0
def getTableFromPath(path):
    path = FileUtil.workspacePathToSysPath(path)
    if path:
        return loadTableScan(path)
    else:
        raise Exception("No file to load")
示例#4
0
def getTableFromPath(path):
    path = FileUtil.workspacePathToSysPath(path)
    if path:
        return loadTableScan(path)
    else:
        raise Exception("No file to load")