def exportTable(ese, tableName): cursor = ese.openTable(tableName) if cursor is None: logging.error('Can"t get a cursor for table: %s' % tableName) return i = 1 print "Table: %s" % tableName while True: record = ese.getNextRow(cursor) if record is None: break print "*** %d" % i for j in record.keys(): if record[j] is not None: print "%-30s: %r" % (j, record[j]) i += 1
def exportTable(ese, tableName): cursor = ese.openTable(tableName) if cursor is None: logging.error('Can"t get a cursor for table: %s' % tableName) return i = 1 print "Table: %s" % tableName while True: try: record = ese.getNextRow(cursor) except: logging.error('Error while calling getNextRow(), trying the next one') continue if record is None: break print "*** %d" % i for j in record.keys(): if record[j] is not None: print "%-30s: %r" % (j, record[j]) i += 1