13 fin = open(infile,
'r')
14 fout = open(outfile,'w')
15 sub =
' ' + fid +
'[ $]'
18 for line
in fin.xreadlines():
20 s = r.search(line[i:])
22 print >>fout,line[0:i+s.end()-1]
25 fin = open(infile,
'r')
26 fout = open(outfile,'w')
27 tot_up = Parameters.parameters[
'view'][
'levels_up']
28 tot_down = Parameters.parameters[
'view'][
'levels_down']
29 print "up=",tot_up,
" down=",tot_down
31 trigger = Parameters.parameters[
'find'][
'immediate_children_threshold']
33 for line
in fin.xreadlines():
38 i=operator.indexOf(b,fid)
42 print >>fout,
"%s %s %s"%(a[0],a[1],string.join(b[i-c:i+1+tot_down]))
46 if __name__ ==
"__main__":
48 print "usage: ", sys.argv[0],
" function_id input_file_prefix"
53 outfile = fid + Parameters.parameters[
'view'][
'out_file_suffix']
54 runme(fid, infile, outfile)