"kumar s" <ps_pyt...@yahoo.com> wrote
For example:
x1.py =
second = raw_input()
x = second.split('\t')
y = x[1:]
print '\t'.join(y)
%cat mybigfile.rod | python x1.py
chr1 433 433 rs56289060 0
+ - - -/C genomic insertion unknown 0 0
unknown between 1
My question:
this program is only printing first line. It is not processing every line
that cat spits to x1.py.
how do I print every line.
You need to read every line.
But since you appear to be on Unix have you looked at the cut command
which would appear to do what you want directly?
Unless you just want the learning experience.
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor