Surya K wrote:
I am on windows. So, as msvcrt is for windows, I wonder if there
is any module that works for both,
http://code.activestate.com/recipes/577977
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription opt
On 2012/01/30 07:20 AM, Surya K wrote:
I want to run code until a "enter" is pressed. Well, it shouldn't wait
for the user to enter "enter"
This is my code:
import msvcrt
chr = 0
while chr != 'q':
print "my code",
if msvcrt.kbhit():
chr = msvcrt.getch()
This isn't workin
On 30/01/12 05:20, Surya K wrote:
I want to run code until a "enter" is pressed. Well, it shouldn't wait
for the user to enter "enter"
This is my code:
import msvcrt
chr = 0
while chr != 'q':
print "my code",
if msvcrt.kbhit():
chr = msvcrt.getch()
You shouldn't need the kbhit test.
Try jus
Surya K wrote:
> I want to run code until a "enter" is pressed. Well, it shouldn't wait for
> the user to enter "enter" This is my code:
This is what it looks like over here:
> import msvcrtchr = 0while chr != 'q': print "my code", if
> msvcrt.kbhit(): chr = msvcrt.getch()
Th
I want to run code until a "enter" is pressed. Well, it shouldn't wait for the
user to enter "enter"
This is my code:
import msvcrtchr = 0while chr != 'q': print "my code", if
msvcrt.kbhit(): chr = msvcrt.getch()
This isn't working the way I wanted. When ever I press enter, the