6 ms·
On a related note. Which python library would you recommend for text-based interfaces? I have never used ncurses, so I don't know how complex it is. What I woul
by peterjs 12y ago
On a related note. Which python library would you recommend for text-based interfaces? I have never used ncurses, so I don't know how complex it is. What I would like to achieve is having a user launch my script from the command line, use the text based interface to select a source and destination folder, set a few parameters and show a progress bar.
- phaer 12y agoI'd say http://urwid.org/ http://urwid.org/ should be the best choice for something like that. The main alternative would be to hack it together by yourself using https://docs.python.org/3.4/library/curses.html https://docs.python.org/3.4/library/curses.html
- SEJeff 12y agoUrwid is definitely the nicest of the curses widget frameworks I've used for python.
- abecedarius 12y agohttps://github.com/thomasballinger/curtsies https://github.com/thomasballinger/curtsies looks well-designed. (I haven't tried it yet. What I do is code to ANSI terminal codes directly: e.g. https://github.com/darius/sketchbook/blob/master/misc/sokoban.py https://github.com/darius/sketchbook/blob/master/misc/sokoba...)
- jojoo 12y agoIt's also possible and very easy to do this with python-dialog[0] or with whiptail[1] (no progress bar). downside: both need external binarys. [0]: http://pythondialog.sourceforge.net/ http://pythondialog.sourceforge.net/ [1]: https://github.com/marwano/whiptail https://github.com/marwano/whiptail