Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make interactive Python script with keyboard arrows navigation in menu

I would like to create interactive Python script (probably using curses?) with menu where user can navigate over menu using keyboard arrows. What is the easiest way to implement such functionality? Any simple usage/tutorial? Thank You!

like image 745
marcinpz Avatar asked Dec 02 '25 13:12

marcinpz


2 Answers

take a look at Python curses module and for example ncurses-ui-python.

There are alternatives like Urwid and Pycdk

like image 110
RanRag Avatar answered Dec 04 '25 02:12

RanRag


You might wanto to take a look also at snack (newt-based library)

like image 22
jcollado Avatar answered Dec 04 '25 03:12

jcollado



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!