[Urwid] Two questions
Ian Ward
ian at excess.org
Thu Jul 24 23:11:59 EDT 2008
Park Shinjo wrote:
> 1. Is it possible to input password-like text with Urwid? For example,
> character is recorded internally but no text or just star(*) is
> displayed.
This is a common question.. Maybe it's time to add a PasswordEdit class,
or at least a good example on the web site.
The simplest way is to create an Edit subclass, eg:
class PasswordEdit(urwid.Edit):
def get_text(self):
return self.caption + "*"*len(self.edit_text), self.attrib
>
> 2. How to use multiple screens(forms) in one program? I defined
> several widgets as a form, and want to connect between them. Because
> the program isn't "wizard", links between forms should be arbitrarily.
>
This is another good candidate for an example. In the past I have
switched between screens by changing the "body" of a frame widget, is
that the kind of thing you are looking for?
Ian
More information about the Urwid
mailing list