M
mo
Can somebody explain how to stop a WHILE loop in running program by pressing
ESC key?
mo
ESC key?
mo
mo said:Can somebody explain how to stop a WHILE loop in running program by pressing
ESC key?
mo said:Can somebody explain how to stop a WHILE loop in running program by pressing
ESC key?
mo said:I tryed your example:
import msvcrt
while 1:
print '.'
if msvcrt.kbhit() and msvcrt.getch() == chr(27):
break
but it doesn't work. It is running (Win2000), there is no messages about
errors but there is no effect when pressing ESC key. What I am doing wrong?
Fredrik said:works for me, when running it from a stock CPython interpreter in a windows
console window, with focus set to that window.
what environment are you using?
Fredrik Lundh" said:works for me, when running it from a stock CPython interpreter in a windows
console window, with focus set to that window.
what environment are you using?
mo said:I use IDLE 1.0.3, Python 2.3.4
The same problem is when running in a win console.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.