-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Sebastian Wiesner wrote:
> Then you will see, that getline returns the line *including the newline
> character*, while raw_input does not. Use line.strip('\n') to remove
> trailing newline characters from the return value of getline.
Ah, thank yo
[ Ross Hetherington <[EMAIL PROTECTED]> ]
> #!/usr/bin/env python
>
> import random
> import sys
> import linecache
>
> rnd = random.randint(1,3)
> line = linecache.getline('testfile', rnd)
>
> print line
Try print repr(line) ...
>
> gss = raw_input('Enter line: ',)
and print repr(gss) ;)
> if gss