Best method for a menu in a command line program?

Terry Reedy tjreedy at udel.edu
Fri Nov 5 04:15:13 CET 2010


On 11/4/2010 7:51 PM, Ben Finney wrote:
> Terry Reedy<tjreedy at udel.edu>  writes:
>
>> Others have answered that, but I would point to the inefficiency for
>> users of having to enter unit and value on two separate lines. The
>> prompt could be "Enter value and unit (f, c, or k) or q to quit: "
>> Allow upper and lower case, with or without a space between.
>
> Well, if we're going to critique the design, I'd say that I find the GNU
> Units program<URL:http://www.gnu.org/software/units/units.html>  to be a
> good flexible implementation of a command-line units converter.
>
> I suspect, though, that the object of the OP was not so much to make a
> good unit converter, but rather to learn from a simple example exercise.

Right. I think he would learn something from the exercize I suggest.

-- 
Terry Jan Reedy




More information about the Python-list mailing list