summaryrefslogtreecommitdiffstats
path: root/examples/prompts/clock-input.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/prompts/clock-input.py')
-rwxr-xr-xexamples/prompts/clock-input.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/prompts/clock-input.py b/examples/prompts/clock-input.py
index e43abd8..80bfa51 100755
--- a/examples/prompts/clock-input.py
+++ b/examples/prompts/clock-input.py
@@ -2,6 +2,7 @@
"""
Example of a 'dynamic' prompt. On that shows the current time in the prompt.
"""
+
import datetime
from prompt_toolkit.shortcuts import prompt
@@ -18,7 +19,7 @@ def get_prompt():
def main():
result = prompt(get_prompt, refresh_interval=0.5)
- print("You said: %s" % result)
+ print(f"You said: {result}")
if __name__ == "__main__":