[Tutor] Input

Dave Angel d at davea.name
Fri Sep 30 22:23:12 CEST 2011


On 09/30/2011 03:24 PM, Cameron Macleod wrote:
> Hi,
>
> When you type
>
> Input("\n\nPress The Enter Key To Exit")
>
> it forces you to press the enter key to close the program. Why is it the
> enter key instead of e.g. the 'esc' key?
>
>

The input() function (not the Input()) function accepts a line of text 
from the user.  That line is terminated by a newline, generated by the 
enter key.

If you're trying to just wait for an "any-key", I don't know of any 
portable way to do it.  There is a way in Windows, however.



-- 

DaveA



More information about the Tutor mailing list