problem_data.py
def parse_axial_data(self, lines):
    """
    Parse data defining axial layers.

    :param list lines: list of lines to be parsed
    :return: index of the last processed line
    """
    for li, line in enumerate(lines):
      if line.startswith('*'):
        continue

      data = line.replace(',', ' ').replace(';', ' ').split()

      if len(data) != 3:
        continue

      try:
        data[0:2] = map(float, data[0:2])
        data[2] = int(data[2])
      except ValueError:
        warning("Invalid axial layer data - assuming 1 axial layer spanning the whole core height.")
      else:
        self.__set_axial_layers_data(data)
        self.layered = True

      return li

    return -1

    Parse data defining axial layers.

    :param list lines: list of lines to be parsed
    :return: index of the last processed line
    
Parse data defining axial layers.
Parse data defining axial layers .
def parse_axial_data(self, lines):
    for li, line in enumerate(lines):
      if line.startswith('*'):
        continue
      data = line.replace(',', ' ').replace(';', ' ').split()
      if len(data) != 3:
        continue
      try:
        data[0:2] = map(float, data[0:2])
        data[2] = int(data[2])
      except ValueError:
        warning("Invalid axial layer data - assuming 1 axial layer spanning the whole core height.")
      else:
        self.__set_axial_layers_data(data)
        self.layered = True
      return li
    return -1
def parse_axial_data ( self , lines ) : for li , line in enumerate ( lines ) : if line . startswith ( '*' ) : continue data = line . replace ( ',' , ' ' ) . replace ( ';' , ' ' ) . split ( ) if len ( data ) != 3 : continue try : data [ 0 : 2 ] = map ( float , data [ 0 : 2 ] ) data [ 2 ] = int ( data [ 2 ] ) except ValueError : warning ( "Invalid axial layer data - assuming 1 axial layer spanning the whole core height." ) else : self . __set_axial_layers_data ( data ) self . layered = True return li return - 1
Parse data defining axial layers.
Parse data defining axial layers .
"""
    Parse data defining axial layers.

    :param list lines: list of lines to be parsed
    :return: index of the last processed line
    """
index of the last processed line
index of the last processed line
self
lines
list of lines to be parsed
list of lines to be parsed