Python cross-platform listening for keypresses? [duplicate]
问题 This question already has answers here : Python read a single character from the user (22 answers) Closed 5 years ago . I need to listen for certain keypresses in a python terminal program without pausing execution with raw_input . I\'ve seen people use a few windows specific ways of listening for keystrokes and I\'ve seen people use large modules like tkinter and pygame which I want to avoid. Is there a lightweight module out there that does this cross platform (at least ubuntu, windows, mac