Hacker News new | past | comments | ask | show | jobs | submit login

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.



I'd say 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


Urwid is definitely the nicest of the curses widget frameworks I've used for python.


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/sokoba...)


It'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/ [1]: https://github.com/marwano/whiptail




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: