Re: Reading in a file

2010-04-14 Thread Gabriel Genellina
En Mon, 12 Apr 2010 15:31:50 -0300, Maggie escribió: i have a basic script i need to implement. i need below code to read in a file and perform operation is it designed to do: #!/usr/bin/python import sys feed = sys.stdin.readlines() for temp in feed: line = temp.split() if len(line) ==

Re: Reading in a file

2010-04-12 Thread Chris Rebert
On Mon, Apr 12, 2010 at 11:31 AM, Maggie wrote: > hello, > > i have a basic script i need to implement. i need below code to read > in a file and perform operation is it designed to do: > > #!/usr/bin/python > > import sys > > feed = sys.stdin.readlines() This sounds like homework, so here are so

Reading in a file

2010-04-12 Thread Maggie
hello, i have a basic script i need to implement. i need below code to read in a file and perform operation is it designed to do: #!/usr/bin/python import sys feed = sys.stdin.readlines() for temp in feed: line = temp.split() if len(line) == 3: if (line[0] == "xmax" or line[0] == "xmi