Handling keyboard events in python

前端 未结 4 1761
忘掉有多难
忘掉有多难 2021-01-27 23:01

How can I handle keyboard events in python? More exactly I need to manage keyboard arrows and some other keys for my command-line application. Is there a module for this or I ne

4条回答
  •  猫巷女王i
    2021-01-27 23:57

    You're probably looking for a python (n)curses library. This will allow to "get around" your terminal buffering and work with key-presses directly.

提交回复
热议问题