Open ccorcos opened 9 years ago
(I am not the project leader, only a minor contributor so far, but you deserve some reply)
Probably not a good addition for this project: blessings is meant to be only a thin API above curses and related functions. Though it may be used directly to write applications, it may also be used by another library to provide more high-level functions such as user interfaces that you propose.
In some terms you can think of blessings as comparable to the OpenGL library, but for terminals -- what you are seeking is something more like what the GTK library is for terminals.
I would personally like to see some sort of UI library that uses blessings -- there are a number of people working on that. @thomasballinger for example has project https://github.com/thomasballinger/curtsies
https://github.com/wardi/urwid is also a popular choice. It does not use blessings (and in my opinion is very unpythonic, it could be said to be javaish if there such a term). But you may find what you need there if you don't particularly care about how you compose code.
Hey, I'm don't write command line applications terribly often, but when I do, I always find myself writing a variety of helper functions. For example here's what I have thus far for my current project:
selectInput
basically gives you a number of options and returns the option you selected.validatedInput
is basically just a wrapper for "raw input" but makes sure you have entered in a valid input.Its super simple, but I'm curious if you know of any resources that have these kinds of UI functions? Maybe it could be a good addition to this project?