-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I'm not sure how this is supposed to work, but all I want is to be able to select from a list of choices. When running this in windows cmd or anaconda I can see the default choice, but pressing tab doesn't display anything else. I really need to make this work in anaconda!
from pypsi import shell, wizard
from pypsi.completers import choice_completer
sh = shell.Shell()
wiz = wizard.PromptWizard(
name="My Wizard",
description="Welcome",
steps=(
# WizardStep(id, name, help, default=None, completer=None, validators=None)
wizard.WizardStep(
id = "step1",
name = "Step 1",
help = "",
completer = choice_completer(['choice1', 'choice2', 'choice3']),
default = "choise1"
),
wizard.WizardStep(
id = "step2",
name = "Step 2",
help = "",
completer = choice_completer([1, 2, 3]),
default = 2
),
)
)
result = wiz.run(sh)
Metadata
Metadata
Assignees
Labels
No labels