plcopen/structures.py
changeset 1747 6046ffa2280f
parent 1743 c3c3d1318130
child 1749 d73b64672238
equal deleted inserted replaced
1746:45d6f5fba016 1747:6046ffa2280f
    98 
    98 
    99 def csv_file_to_table(file):
    99 def csv_file_to_table(file):
   100     """
   100     """
   101     take a .csv file and translate it it a "csv_table"
   101     take a .csv file and translate it it a "csv_table"
   102     """
   102     """
   103     return [ map(string.strip, line.split(';')) for line in file.xreadlines()]
   103     return [map(string.strip, line.split(';')) for line in file.xreadlines()]
   104 
   104 
   105 
   105 
   106 def find_section(section_name, table):
   106 def find_section(section_name, table):
   107     """
   107     """
   108     seek into the csv table to a section ( section_name match 1st field )
   108     seek into the csv table to a section ( section_name match 1st field )
   228                         funcdeclin = funcdeclname
   228                         funcdeclin = funcdeclname
   229 
   229 
   230                     for outype in output_types:
   230                     for outype in output_types:
   231                         if outype is not None:
   231                         if outype is not None:
   232                             decl_tpl = Function_decl["outputs"][0]
   232                             decl_tpl = Function_decl["outputs"][0]
   233                             Function_decl["outputs"] = [ (decl_tpl[0], outype,  decl_tpl[2])]
   233                             Function_decl["outputs"] = [(decl_tpl[0], outype,  decl_tpl[2])]
   234                             if funcdeclname_orig.endswith('*'):
   234                             if funcdeclname_orig.endswith('*'):
   235                                 funcdeclout =  funcdeclin + '_' + outype
   235                                 funcdeclout =  funcdeclin + '_' + outype
   236                             else:
   236                             else:
   237                                 funcdeclout =  funcdeclin
   237                                 funcdeclout =  funcdeclin
   238                         else:
   238                         else: