How2 use curses for data input
grant at nowhere.
Fri Apr 21 19:23:09 CEST 2000
In article <38FF8F9C.9D533E74 at sprint.ca>, Miles Thompson wrote:
>I located it on the RH system here in the office at home. The
>target machine is Debian, and I think I can install RPM on it
>so that if need be, I can get the RPM. Debian doesn't seem to
>have a snack package.
It's something that RH did for use in their installer and
system admin tools, so I don't think it's part of the standard
Python dist. Which is a shame.
>Thanks for the lead, much appreciated. I've searched google,
>www.python.org, and www.debian.org for information on how to
Didn't find much, eh? (Been there.)
>All that's on my system is snack.py, .pyc and _snackmodule.so.
>I *hoped* there might be some clues in __builtin__ or in
>snakc.py, but I drew a blank.
Here's a little demo program:
screen = snack.SnackScreen()
x = snack.ButtonChoiceWindow(screen,
"This is a test of the button choice window")
y = snack.EntryWindow(screen,
"This is some text",
z = snack.ListboxChoiceWindow(screen,
"This is a bunch of text for thelist box choice window",
The above program uses some pre-defined window layouts. The
newt source package contains some other more complex examples
showing how to layout your own windows using a grid placement
manager. The nested checkbox-tree widget is pretty cool.
I'll put the newt source package in my ftp directory:
Newt/snack is really a handy little package. Too bad it's so
little known. The tutorial contained in the source package I
have is a bit out of date and doesn't explain grid widgets, so
you've got to figure them out based on the source code and the
example programs. I should look around to see if there's a
newer version of newt available...
Grant Edwards grante Yow! I OWN six pink
More information about the Python-list