[Tutor] Issue w/ string input "for", "not", "while", "else" etc.

Alan Gauld alan.gauld at btinternet.com
Tue Nov 26 17:57:56 CET 2013


On 26/11/13 16:49, Peter Otten wrote:

>> When executing the program, in case the user input is "for", "not",
>> "True", "while" Python interprets that as a command and changes the
>> input's color to the corresponding command.
...
>
> Are you running the program inside idle? The (in this case unwanted) syntax
> highlighting is a feature of idle's shell.

Good catch, I didn't notice that Rafael was only complaining about the 
colorizing of his text. I assumed it was actually executing the input.
I suspect the colorizing happens in most IDEs not just IDLE?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list