# Path: clonedigger/logilab/common/compat.py
# def enumerate(iterable):
#     """emulates the python2.3 enumerate() function"""
#     i = 0
#     for val in iterable:
#         yield i, val
#         i += 1
#     #return zip(range(len(iterable)), iterable)
# 
# def sum(seq, start=0):
#     """Returns the sum of all elements in the sequence"""
#     return reduce(operator.add, seq, start)
# 
# class set(_baseset):
#     """mutable set"""
#     def add(self, value):
#         self._data[value] = 1
# 
#     def remove(self, element):
#         """removes <element> from set"""
#         del self._data[element]
# 
#     def pop(self):
#         """pops an arbitrary element from set"""
#         return self._data.popitem()[0]
# 
#     def __hash__(self):
#         """mutable et cannot be hashed."""
#         raise TypeError("set objects are not hashable")


from future import standard_library
from builtins import zip
from builtins import str
from builtins import range
from builtins import *
from builtins import object
from warnings import warn
from clonedigger.logilab.common.compat import enumerate, sum, set
import re    
        """
        # Define col_headers (colstpec elements)
        for col_index in range(len(self._table.col_names)+1):
            self._stream.write(self.renderer.define_col_header(col_index,
                                                              self.style))
        
        self._stream.write("<thead>\n<row>\n")
        # XXX FIXME : write an empty entry <=> the first (__row_column) column
        self._stream.write('<entry></entry>\n')
        for col_name in self._table.col_names:
            self._stream.write(self.renderer.render_col_cell(
                col_name, self._table,
                self.style))
            
        self._stream.write("</row>\n</thead>\n")


    def _write_body(self):
        """Writes the table body
        """
        self._stream.write('<tbody>\n')
        
        for row_index, row in enumerate(self._table.data):
            self._stream.write('<row>\n')
            row_name = self._table.row_names[row_index]
            # Write the first entry (row_name)
            self._stream.write(self.renderer.render_row_cell(row_name,
                                                            self._table,
                                                            self.style))
            

# Path: clonedigger/logilab/common/compat.py
# def enumerate(iterable):
#     """emulates the python2.3 enumerate() function"""
#     i = 0
#     for val in iterable:
#         yield i, val
#         i += 1
#     #return zip(range(len(iterable)), iterable)
# 
# def sum(seq, start=0):
#     """Returns the sum of all elements in the sequence"""
#     return reduce(operator.add, seq, start)
# 
# class set(_baseset):
#     """mutable set"""
#     def add(self, value):
#         self._data[value] = 1
# 
#     def remove(self, element):
#         """removes <element> from set"""
#         del self._data[element]
# 
#     def pop(self):
#         """pops an arbitrary element from set"""
#         return self._data.popitem()[0]
# 
#     def __hash__(self):
#         """mutable et cannot be hashed."""
#         raise TypeError("set objects are not hashable")


# Path: clonedigger/logilab/common/table.py
from future import standard_library
from builtins import zip
from builtins import str
from builtins import range
from builtins import *
from builtins import object
from warnings import warn
from clonedigger.logilab.common.compat import enumerate, sum, set
import re    

        """
        # Define col_headers (colstpec elements)
        for col_index in range(len(self._table.col_names)+1):
            self._stream.write(self.renderer.define_col_header(col_index,
                                                              self.style))
        
        self._stream.write("<thead>\n<row>\n")
        # XXX FIXME : write an empty entry <=> the first (__row_column) column
        self._stream.write('<entry></entry>\n')
        for col_name in self._table.col_names:
            self._stream.write(self.renderer.render_col_cell(
                col_name, self._table,
                self.style))
            
        self._stream.write("</row>\n</thead>\n")


    def _write_body(self):
        """Writes the table body
        """
        self._stream.write('<tbody>\n')
        
        for row_index, row in enumerate(self._table.data):
            self._stream.write('<row>\n')
            row_name = self._table.row_names[row_index]
            # Write the first entry (row_name)
            self._stream.write(self.renderer.render_row_cell(row_name,
                                                            self._table,
                                                            self.style))
            

            for col_index, cell in enumerate(row):