Ask coding questions

← Back to all posts
Non Blocking User Input with Curses
2plus2is4hoi (94)

How can you get non blocking user input with the curses module in python?

Answered by Coder100 (17018) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (17018)

It's called halfdelay, what a weird name XD
https://docs.python.org/3/library/curses.html?highlight=halfdelay#curses.halfdelay

So, it is blocking, but blocking like time.sleep, so technically not blocking. Useful for things like snake!