-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: J3ldo <[email protected]> Co-authored-by: AN Long <[email protected]>
- Loading branch information
1 parent
88c9312
commit 88ba0f3
Showing
3 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from pick import pick, Option | ||
|
||
|
||
title = "Please choose an option: " | ||
options = [ | ||
Option("Option 1", description="All options are `enabled` by default."), | ||
Option("Option 2", description="You can change that by changing the `enabled` attribute of the `Option` object to `False`."), | ||
Option("Option 3", description="This option is disabled!", enabled=False), | ||
Option("Option 4", description="Moving up and down, skips over the disabled options.") | ||
] | ||
option, index = pick(options, title, indicator="=>") | ||
print(f"You chose {option} at index {index}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters