How2 use curses for data input

Grant Edwards grant at nowhere.
Thu Apr 20 17:11:11 EDT 2000


In article <38FF6DE2.5751423A at sprint.ca>, Miles Thompson wrote:

>I 've read the curses part of the manual, and the HOWTO, but I'm not
>much wiser. I need to capture some user input (name of a new directory
>for archiving some web files), and I understand how to define a window,
>etc. What I don't know to do is how to edit the lines, and loop from
>last to first.

You might want to take a look at the "snack" module, which is a
wrapper for the newt library (which is based on slang rather
than curses).  It impliments a set of text-mode widgets such as
buttons, scroll lists, data entry fields, checkboxes, etc.  You
stick a bunch of them on a "form" and pop it up.  When the user
is done, you get the values back somehow (I forget exactly).

If all you need to do is prompt the user for some data, it
should do the trick.

Redhat's text-mode installer is (or at least was) written in
Python using snack/newt.

-- 
Grant Edwards                   grante             Yow!  Why was I BORN?
                                  at               
                               visi.com            



More information about the Python-list mailing list