The PythonProgress repository host a loose collection of python snippets which help to communicate progress and status information to the user. Each section of this README file contains a demonstration of a snippet.
DoingDone
from time import sleep
from pythonprogress import DoingDone
with DoingDone("Conncting to server") as conncting:
sleep(3)
# raise Exception()
# connecting.fail() resolves to 'fail' regardless of exceptions
# connecting.succeed() resolves to 'done' regardless of exceptions
Prints either
Connecting to server... done
of
Connecting to server... fail