예제 #1
0
def _parse_tuple(line, description):
    """
        parses a mapi data tuple, and returns a list of python types
        """
    elements = line[1:-1].split(',\t')
    if len(elements) == len(description):
        return tuple([
            pythonize.convert(element.strip(), description[1])
            for (element, description) in zip(elements, description)
        ])
예제 #2
0
 def __parse_tuple(self, line):
     """ parses a mapi data tuple, and returns a list of python types"""
     elements = line[1:-1].split(',\t')
     if len(elements) == len(self.description):
         return tuple([pythonize.convert(element.strip(), description[1])
                       for (element, description) in zip(elements,
                                                         self.description)])
     else:
         self.__exception_handler(InterfaceError,
                                  "length of row doesn't match header")
예제 #3
0
 def __parse_tuple(self, line):
     """ parses a mapi data tuple, and returns a list of python types"""
     elements = line[1:-1].split(',\t')
     if len(elements) == len(self.description):
         return tuple([pythonize.convert(element.strip(), description[1])
                       for (element, description) in zip(elements,
                                                         self.description)])
     else:
         self.__exception_handler(InterfaceError,
                                  "length of row doesn't match header")