Esempio n. 1
0
    def testSpreadsheet(self):
        table = [ [ 'XPos', 'YPos' ], [ '1', '2' ], [ '3', '4' ] ]
        
        filename = '/tmp/spreadsheet.csv'
        writeSpreadsheet(filename, table)
        
        table2 = readSpreadsheet(filename)
        print table2
        self.assertEqual(table, table2)

        os.remove(filename)
Esempio n. 2
0
    def testSpreadsheet(self):
        table = [['XPos', 'YPos'], ['1', '2'], ['3', '4']]

        filename = '/tmp/spreadsheet.csv'
        writeSpreadsheet(filename, table)

        table2 = readSpreadsheet(filename)
        print table2
        self.assertEqual(table, table2)

        os.remove(filename)
Esempio n. 3
0
def loadTableScan(filename, pre=None, post=None, start=None, stop=None):
    """Load table from spreadsheet file
       
    :param filename:     File name, either '*.cvs', '*.tab', '*.xls' or '*.gnumeric'
    :param pre:          Command or list of commands executed at the start of the table.
    :param post:         Command or list of commands executed at the end of the table.
    :param start:        Command or list of commands executed to start each 'Wait For'.
    :param stop:         Command or list of commands executed at the end of each 'Wait For'.
    """
    table = readSpreadsheet(filename)
    headers = table[0]
    rows = table[1:]
    return TableScan(headers, rows, pre, post, start, stop)
Esempio n. 4
0
def loadTableScan(filename, pre=None, post=None, start=None, stop=None):
    """Load table from spreadsheet file
       
    :param filename:     File name, either '*.cvs', '*.tab', '*.xls' or '*.gnumeric'
    :param pre:          Command or list of commands executed at the start of the table.
    :param post:         Command or list of commands executed at the end of the table.
    :param start:        Command or list of commands executed to start each 'Wait For'.
    :param stop:         Command or list of commands executed at the end of each 'Wait For'.
    """
    table = readSpreadsheet(filename)
    headers = table[0]
    rows = table[1:]
    return TableScan(headers, rows, pre, post, start, stop)