[Tutor] small program, but I'm very confused

Bob Gailer ramrom@earthling.net
Tue Nov 5 14:46:02 2002


At 01:22 PM 11/5/2002 -0600, you wrote:
I get an error when I try to write to the file.  It says I have invalid 
syntax,
with a carat point towards the file name for the following 
line:  f.write('\2\n')

Condensing out irrelevant lines I get:

for y in loginsList:
re.findall(('^loginsList[y]:x:[0-9]{4}:[0-9]{2,3}:)([A-Za-z]\s[A-Za-z])(.*?)(/n)',
'/etc/passwd')
      f.write('\2\n')

What strikes me here is incorrect indentation - shouldn't re.findall be 
indented the same as f.write('\2\n')?
Bob Gailer
170 Forsythe Rd
Nederland CO 80466
303-442-2625