> For some reason I thought that readline counted the \n at the end of
> each line and stopped at each one. Clearly, I was mistaken!
That is kind of what the default behaviour does. It doesn't
actually count the \n characters but it reads up to and
including it.
Alan G.
_
On 31/07/13 21:12, Mike McTernan wrote:
I am having problems with the readline command in Python 2.7.
> script, zodiac = argv
> prediction = open(zodiac, "r")
This code is very fragile, you should check that zodiac is actually
being set by the user and ideally that it is a real file before us
On 07/31/2013 04:12 PM, Mike McTernan wrote:
I am having problems with the readline command in Python 2.7.
I have a text file that has 12 lines of text, each line represents a
response to a variable called star_sign that is collected via
raw_input.
However, instead of printing the line 5 it pri