diff options
Diffstat (limited to '')
-rwxr-xr-x | examples/dialogs/button_dialog.py | 1 | ||||
-rwxr-xr-x | examples/dialogs/checkbox_dialog.py | 3 | ||||
-rwxr-xr-x | examples/dialogs/input_dialog.py | 1 | ||||
-rwxr-xr-x | examples/dialogs/messagebox.py | 1 | ||||
-rwxr-xr-x | examples/dialogs/password_dialog.py | 1 | ||||
-rwxr-xr-x | examples/dialogs/progress_dialog.py | 1 | ||||
-rwxr-xr-x | examples/dialogs/radio_dialog.py | 1 | ||||
-rwxr-xr-x | examples/dialogs/styled_messagebox.py | 1 | ||||
-rwxr-xr-x | examples/dialogs/yes_no_dialog.py | 1 |
9 files changed, 10 insertions, 1 deletions
diff --git a/examples/dialogs/button_dialog.py b/examples/dialogs/button_dialog.py index 7a99b9a..24e1a47 100755 --- a/examples/dialogs/button_dialog.py +++ b/examples/dialogs/button_dialog.py @@ -2,6 +2,7 @@ """ Example of button dialog window. """ + from prompt_toolkit.shortcuts import button_dialog diff --git a/examples/dialogs/checkbox_dialog.py b/examples/dialogs/checkbox_dialog.py index 90be263..70df166 100755 --- a/examples/dialogs/checkbox_dialog.py +++ b/examples/dialogs/checkbox_dialog.py @@ -2,6 +2,7 @@ """ Example of a checkbox-list-based dialog. """ + from prompt_toolkit.formatted_text import HTML from prompt_toolkit.shortcuts import checkboxlist_dialog, message_dialog from prompt_toolkit.styles import Style @@ -30,7 +31,7 @@ results = checkboxlist_dialog( if results: message_dialog( title="Room service", - text="You selected: %s\nGreat choice sir !" % ",".join(results), + text="You selected: {}\nGreat choice sir !".format(",".join(results)), ).run() else: message_dialog("*starves*").run() diff --git a/examples/dialogs/input_dialog.py b/examples/dialogs/input_dialog.py index 6235265..057bc37 100755 --- a/examples/dialogs/input_dialog.py +++ b/examples/dialogs/input_dialog.py @@ -2,6 +2,7 @@ """ Example of an input box dialog. """ + from prompt_toolkit.shortcuts import input_dialog diff --git a/examples/dialogs/messagebox.py b/examples/dialogs/messagebox.py index 4642b84..7b11580 100755 --- a/examples/dialogs/messagebox.py +++ b/examples/dialogs/messagebox.py @@ -2,6 +2,7 @@ """ Example of a message box window. """ + from prompt_toolkit.shortcuts import message_dialog diff --git a/examples/dialogs/password_dialog.py b/examples/dialogs/password_dialog.py index 39d7b9c..d3752ba 100755 --- a/examples/dialogs/password_dialog.py +++ b/examples/dialogs/password_dialog.py @@ -2,6 +2,7 @@ """ Example of an password input dialog. """ + from prompt_toolkit.shortcuts import input_dialog diff --git a/examples/dialogs/progress_dialog.py b/examples/dialogs/progress_dialog.py index 1fd3ffb..7a29f1b 100755 --- a/examples/dialogs/progress_dialog.py +++ b/examples/dialogs/progress_dialog.py @@ -2,6 +2,7 @@ """ Example of a progress bar dialog. """ + import os import time diff --git a/examples/dialogs/radio_dialog.py b/examples/dialogs/radio_dialog.py index 94d80e2..aed9d66 100755 --- a/examples/dialogs/radio_dialog.py +++ b/examples/dialogs/radio_dialog.py @@ -2,6 +2,7 @@ """ Example of a radio list box dialog. """ + from prompt_toolkit.formatted_text import HTML from prompt_toolkit.shortcuts import radiolist_dialog diff --git a/examples/dialogs/styled_messagebox.py b/examples/dialogs/styled_messagebox.py index 3f6fc53..5ca197f 100755 --- a/examples/dialogs/styled_messagebox.py +++ b/examples/dialogs/styled_messagebox.py @@ -7,6 +7,7 @@ styling. This also demonstrates that the `title` argument can be any kind of formatted text. """ + from prompt_toolkit.formatted_text import HTML from prompt_toolkit.shortcuts import message_dialog from prompt_toolkit.styles import Style diff --git a/examples/dialogs/yes_no_dialog.py b/examples/dialogs/yes_no_dialog.py index 4b08dd6..6463a38 100755 --- a/examples/dialogs/yes_no_dialog.py +++ b/examples/dialogs/yes_no_dialog.py @@ -2,6 +2,7 @@ """ Example of confirmation (yes/no) dialog window. """ + from prompt_toolkit.shortcuts import yes_no_dialog |