Hi all,
I have written a script to parse a CSV file:
import csv
def get_lines(fname):
fhandle = csv.reader(open(fname,"rb"))
for line in fhandle:
while fhandle.next()[0] == "prot_hit_num":
continue
for row in fhandle:
print row
result = get_lines("file.csv")
print result
I need to print the data from "prot_hit_num" and before the line "peptide
sequence".
I am able to print the whole from "prot_hit_num" to the end of the file but
I need to break before line "peptide sequence........". How should i do
this.
--
http://mail.python.org/mailman/listinfo/python-list