Re: [Tutor] interactive mode questions

2009-12-25 Thread Alan Gauld
"rick" wrote while True: reply = input('Enter text:') if reply == 'stop': break print(reply.upper()) which works "as advertised" in an interactive session, but not in a script. Yes, I tried tossing the script to both versions of interpreter, it doesn't work with either 2.6 or 3.1.

Re: [Tutor] interactive mode questions

2009-12-25 Thread Timo
Op 25-12-09 17:49, rick schreef: I'm working my way through Mr Lutz's "Learning Python", and I come to this snippet (page 271): while True: reply = input('Enter text:') Try this: reply = raw_input('Enter text: ') Cheers, Timo if reply == 'stop': break print(reply.upper

[Tutor] interactive mode questions

2009-12-25 Thread rick
I'm working my way through Mr Lutz's "Learning Python", and I come to this snippet (page 271): while True: reply = input('Enter text:') if reply == 'stop': break print(reply.upper()) which works "as advertised" in an interactive session, but not in a script. Yes, I tried tossing the