2

I'm trying to make terminal user interface with python which I will use it as post installation script for min linux os. But I don't want to use ncurses or urwid because it feels like overkill. I'm looking more in whiptail or screen direction. But I don't know is it better to call ui terminal rendering from python subprocess or to use it with python bindings like pythondialog, here are the reasons for my doubts.

  1. Is whiptail/screen available on every minimal linux image... subprocess should be better suited for my program.

  2. pythondialog requires installation of python3-dialog package. Since I want to make a postinstallation program for linux min image I want to use dependencies as little as possible.

What would you suggest for my problem?

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
  • The comment about `screen` is unclear, because GNU screen does not do anything with user interfaces. To comment on the rest, you should give examples of the minimal systems that you are interested in. – Thomas Dickey May 04 '15 at 10:51

2 Answers2

3

Maybe npyscreen is what you are looking for, but i havent tried it. It just installed for me in fresh 2.7 virtualenv with zero dependencies - EDIT: sorry no, it runs on top of ncurses.

kert
  • 2,161
  • 21
  • 22
  • Actually, if the target system uses bash (or many other programs), there is already an ncurses dependency. The OPs comment about ncurses was regarding the amount of work needed to develop the interface. – Thomas Dickey May 04 '15 at 10:50
0

I've had a similar notion about ncurses or urwid. You might want to try:

  • prompt toolkit - focus on UI, comes with tons of examples
  • asciimatics - handy for UI and animations, also with a bunch of helpful examples

Both have a responsive and active community.

Joël Brigate
  • 237
  • 2
  • 13