5 return text.replace("_", " ").capitalize()
7 class Controller(object):
8 def __init__(self, dir, schema, input):
12 def ask(self, options):
14 Interactively ask the user for information.
16 self.schema.fill(options)
17 for name, arg in self.schema.args.items():
18 if name in self.schema.provides:
20 if getattr(options, name) is not None:
23 val = self.input.inputbox(arg.prompt + "\n\n" + humanize(name) + ":")
26 val = self.input.passwordbox(arg.prompt + "\n\n" + humanize(name) + " (cursor will not move):")
27 val2 = self.input.passwordbox("Please enter the password again (cursor will not move):")
29 self.input.msgbox("Passwords didn't match.")
32 setattr(options, name, val)
33 self.schema.load(options)