I was wondering if there was a way to read keypresses in a while loop (for example pressing the "c" key to break the loop and continue the rest of the program). I want to use this with socket.recv() so I can break the loop that receives connections when I press a key.
Is there a module that checks for events or keypresses that I can use in a while loop?
Read key events in while loops.
Page 1 of 11 Replies - 838 Views - Last Post: 27 August 2012 - 08:13 AM
Replies To: Read key events in while loops.
#2
Re: Read key events in while loops.
Posted 27 August 2012 - 08:13 AM
I know Pygame has keyListeners, I'm sure some of the GUI frameworks do too. I realize neither of these are particularly ideal though.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|