diff --git a/lib/matplotlib/backends/backend_webagg.py b/lib/matplotlib/backends/backend_webagg.py index 9c1a0e9a7f60..9583906ab2fe 100644 --- a/lib/matplotlib/backends/backend_webagg.py +++ b/lib/matplotlib/backends/backend_webagg.py @@ -21,6 +21,7 @@ import json import os import random +import sys import socket import threading @@ -333,11 +334,13 @@ def start(cls): launched. We may end up with two concurrently running loops in that unlucky case with all the expected consequences. """ - print("Press Ctrl+C to stop server") + print("Press Ctrl+C to stop WebAgg server") + sys.stdout.flush() try: tornado.ioloop.IOLoop.instance().start() except KeyboardInterrupt: - print("Server stopped") + print("Server is stopped") + sys.stdout.flush() finally: cls.started = False