marcinpz
marcinpz

Reputation: 675

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!

Upvotes: 3

Views: 8066

Answers (3)

Chazu
Chazu

Reputation: 1018

You might also want to check out Unicurses, which wraps python's native curses module in linux and pdcurses in Windows.

Unicurses has the benefit of maintaining a style of usage which is consistent with nCurses and PDCurses. Therefore, tutorials such as this one will be more helpful if you're wrapping puthon curses with unicurses.

Upvotes: 0

jcollado
jcollado

Reputation: 40374

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

Upvotes: 1

RanRag
RanRag

Reputation: 49537

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

There are alternatives like Urwid and Pycdk

Upvotes: 6

Related Questions