More problems....
seanb at home.com
seanb at home.com
Tue Jan 18 20:53:47 EST 2000
On 18 Jan, TechSpood wrote:
> I have been reading tutorials for about 2 weeks now, and just now decided to
> put that knowledge to work, but I am having a huge problem...I will write a
> simple program (in the IDLE enviroment) then when I run it, it will run it
> til it gets to the first input statement, at which time it will stop reading
> the program. I don't get a syntax error or any other kind of error. After
> I went back and read and re-read the tutorials i got very frusterated after
> not being able to find absolutly any errors in my code... I even went so far
> as to copy the code excactly as it was in a tutorial and put it in the
> compiler.... same damn problem. Is there some option I need to turn on or
> some option that I might of accidently turned on that I wasn't supposed to?
>
> Thanks
>
>
Is it possible that the program is witing for your input?
For example, the code:
spam = input('Enter a line of python code, then press ENTER: ')
print 'Your result is', spam
will print the prompt:
Enter a line of python code, then press ENTER:
and then wait until a return. Whatever the user entered is then run
through the python interpreter, and returned to the variable spam.
Finally, python will kindly print out the result.
--
Sean Blakey
(206)297-7123
quine = ['print "quine =",quine,"; exec(quine[0])"']; exec(quine[0])
More information about the Python-list
mailing list