My question is: i made a program that counts up and up continuously in the background but i want it to print what number it is up to when you press a certain button such as ENTER. I have tried using raw_inputs() but all that happens is it keeps waiting every time for an input rather then just continuing counting like it is meant to. Any help would be greatly appreciated.
Jump to Post
If you are using Windows you can do this:
# get the character of a key pressed (no return key needed) # works only in the command window and with Windows OS from msvcrt import getch print "press a char key (escape key to exit)" while True: …
All 6 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.