Re: readln() until EOF

2008-07-24 Thread Bruno Desthuilliers
korean_dave a écrit : a = open("Thefile.txt","r") while ?: result = a.readln() I assume you meant "a.readline()" ? Anyway... what do i put in if i want to keep reading line by line until i reach the end of the file? a = open("path/to/file.ext") for line in a: do_something_wit

Re: readln() until EOF

2008-07-24 Thread Stephen Johnson
the_file = open(path, 'r') for this_line in the_file: #do stuff with this_line -Steve Johnson On Jul 24, 2008, at 3:09 PM, korean_dave wrote: a = open("Thefile.txt","r") while ?: result = a.readln() what do i put in if i want to keep reading line by line until i reach the e