def _read_mesafile(filename,data_rows=<NUM_LIT:0>,only='<STR_LIT:all>'):
f=open(filename,'<STR_LIT:r>')<EOL>vv=[]<EOL>v=[]<EOL>lines = []<EOL>line  = '<STR_LIT>'<EOL>for i in range(<NUM_LIT:0>,<NUM_LIT:6>):<EOL><INDENT>line = f.readline()<EOL>lines.extend([line])<EOL><DEDENT>hval  = lines[<NUM_LIT:2>].split()<EOL>hlist = lines[<NUM_LIT:1>].split()<EOL>header_attr = {}<EOL>for a,b in zip(hlist,hval):<EOL><INDENT>header_attr[a] = float(b)<EOL><DEDENT>if only is '<STR_LIT>':<EOL><INDENT>return header_attr<EOL><DEDENT>cols    = {}<EOL>colnum  = lines[<NUM_LIT:4>].split()<EOL>colname = lines[<NUM_LIT:5>].split()<EOL>for a,b in zip(colname,colnum):<EOL><INDENT>cols[a] = int(b)<EOL><DEDENT>data = []<EOL>old_percent = <NUM_LIT:0><EOL>for i in range(data_rows):<EOL><INDENT>percent = int(i*<NUM_LIT:100>/np.max([<NUM_LIT:1>, data_rows-<NUM_LIT:1>]))<EOL>if percent >= old_percent + <NUM_LIT:5>:<EOL><INDENT>sys.stdout.flush()<EOL>sys.stdout.write("<STR_LIT>" + "<STR_LIT>" % percent)<EOL>old_percent = percent<EOL><DEDENT>line = f.readline()<EOL>v=line.split()<EOL>try:<EOL><INDENT>vv=np.array(v,dtype='<STR_LIT>')<EOL><DEDENT>except ValueError:<EOL><INDENT>for item in v:<EOL><INDENT>if item.__contains__('<STR_LIT:.>') and not item.__contains__('<STR_LIT:E>'):<EOL><INDENT>v[v.index(item)]='<STR_LIT:0>'<EOL><DEDENT><DEDENT><DEDENT>data.append(vv)<EOL><DEDENT>print('<STR_LIT>')<EOL>f.close()<EOL>a=np.array(data)<EOL>data = []<EOL>return header_attr, cols, a<EOL>
private routine that is not directly called by the user