eric3 question
Gerrit van Dyk
gvandyk.nospam at agileworks.net
Tue May 31 01:57:05 EDT 2005
Alexander Zatvornitskiy wrote:
> Hello All!
>
> I'am using eric3 IDE under win32 (snapshot 2005-04-10), and have a trouble. I
> use this code:
> print "enter q to quit, or smthing else to continue"
> while not sys.stdin.readline()=="q":
> smthing(else)
>
Try using raw_input() instead of the sys.stdin.readline(). raw_input()
is the preferred way of getting console input.
Like this:
print "enter q to quit, or smthing else to continue"
while not raw_input() == 'q':
smthing(else)
Or you can do it this way:
while not raw_input("enter q to quit, or smthing else to continue: ")
smthing(else)
Gerrit van Dyk
More information about the Python-list
mailing list