diff options
Diffstat (limited to 'examples/telnet/chat-app.py')
-rwxr-xr-x | examples/telnet/chat-app.py | 5 |
1 files changed, 3 insertions, 2 deletions
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"), ] ) |