From 0ec0d68b62d119f96efb7f23c1bc119dc07ba268 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 13 Jun 2019 12:59:05 +0100 Subject: [PATCH] Flush after print --- chat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chat.py b/chat.py index f0a47d8..c3f4f3c 100644 --- a/chat.py +++ b/chat.py @@ -21,6 +21,11 @@ else: 'Usage: chat.py [ HOST PORT SCOPE | WEBSOCKETURL SCOPE | UNIXSOCKETPATH SCOPE ]\n') sys.exit(1) +_print = print +def print(*items): + _print(*items) + sys.stdout.flush() + ## Courtesy of http://listofrandomnames.com/ :-) names = ['Daria', 'Kendra', 'Danny', 'Rufus', 'Diana', 'Arnetta', 'Dominick', 'Melonie', 'Regan', 'Glenda', 'Janet', 'Luci', 'Ronnie', 'Vita', 'Amie', 'Stefani', 'Catherine', 'Grady',