How 2 invoke python 2 read from text file under W2k
Tom Karas
Tom.Karas at htp-tel.de
Sun Dec 16 17:30:13 EST 2001
"Hernan M. Foffani" wrote:
>
> Define a function and call it later. like:
>
> def cooked_or_raw():
> temperature = input("What is the temperature of the spam?")
> if temperature > 50:
> print "The salad is properly cooked."
> else:
> print "Cook the salad some more."
>
> cooked_or_raw()
I did so in the shell and recived the error message:
"File "<stdin>", line XX
cooked_and_raw()
^
SyntaxError: invalid syntax"
What do i have to do do end my code inserting and to lance a normal
call command like cooked_or_raw() ?
I started to play arround with the code from the installed
"sliderdemo.py" and i can generate a window and can add a button.
But the code is to complex to understand fully. May be there is a more
educational version of the sliderdemo.py - so that one can start with a
full working example and learn the elements step by step.
Thanks for your help.
cu
best regards
tom karas
More information about the Python-list
mailing list