From 5b43aaac61ac94abe722bc98ae58468618f2f512 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 5 Jun 2024 06:45:14 +0200 Subject: Adding upstream version 3.0.46. Signed-off-by: Daniel Baumann --- examples/telnet/chat-app.py | 5 +++-- examples/telnet/dialog.py | 1 + examples/telnet/hello-world.py | 1 + examples/telnet/toolbar.py | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/telnet') diff --git a/examples/telnet/chat-app.py b/examples/telnet/chat-app.py index 2e3508d..8f4cb2c 100755 --- a/examples/telnet/chat-app.py +++ b/examples/telnet/chat-app.py @@ -4,6 +4,7 @@ A simple chat application over telnet. Everyone that connects is asked for his name, and then people can chat with each other. """ + import logging import random from asyncio import Future, run @@ -84,9 +85,9 @@ def _send_to_everyone(sender_connection, name, message, color): if c != sender_connection: c.send_above_prompt( [ - ("fg:" + color, "[%s]" % name), + ("fg:" + color, f"[{name}]"), ("", " "), - ("fg:" + color, "%s\n" % message), + ("fg:" + color, f"{message}\n"), ] ) diff --git a/examples/telnet/dialog.py b/examples/telnet/dialog.py index c674a9d..1044fb0 100755 --- a/examples/telnet/dialog.py +++ b/examples/telnet/dialog.py @@ -2,6 +2,7 @@ """ Example of a telnet application that displays a dialog window. """ + import logging from asyncio import Future, run diff --git a/examples/telnet/hello-world.py b/examples/telnet/hello-world.py index c19c60c..f7bbda1 100755 --- a/examples/telnet/hello-world.py +++ b/examples/telnet/hello-world.py @@ -6,6 +6,7 @@ The interaction function is a prompt_toolkit coroutine. Also see the `hello-world-asyncio.py` example which uses an asyncio coroutine. That is probably the preferred way if you only need Python 3 support. """ + import logging from asyncio import run diff --git a/examples/telnet/toolbar.py b/examples/telnet/toolbar.py index d6ae886..6e31c9f 100755 --- a/examples/telnet/toolbar.py +++ b/examples/telnet/toolbar.py @@ -3,6 +3,7 @@ Example of a telnet application that displays a bottom toolbar and completions in the prompt. """ + import logging from asyncio import run -- cgit v1.2.3