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

Peter Otten __peter__ at web.de
Tue Nov 26 18:11:22 CET 2013


Alan Gauld wrote:

> 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?

I don't know, I think it's a side effect of idle using the same window for 
interaction with command line programs and as the interactive interpreter. 




More information about the Tutor mailing list