[Tutor] need help with msvcrt.getch()
Richard D. Moores
rdmoores at gmail.com
Tue Jul 27 17:12:42 CEST 2010
On Tue, Jul 27, 2010 at 07:36, Tim Golden <mail at timgolden.me.uk> wrote:
> On 27/07/2010 15:22, Richard D. Moores wrote:
>
>> Python 3.1 on Vista.
>>
>> Please see<http://tutoree7.pastebin.com/f3TaxDBc>.
>>
>> I'm trying to recall what I used to know, thus this simple script. But 'y'
>> or 'q' do nothing. What's wrong?
>>
>
> msvcrt.getch returns bytes on Python 3.1; you're comparing against
> string. Try
>
> if key == b'y':
> ... etc.
>
Yes! That did it.
Thank you.
Dick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100727/587ff28c/attachment.html>
More information about the Tutor
mailing list