It would be very convenient if the Python interactive shell displayed the current time each time the invitation was updated . I’m thinking about setting up my invitation to something like: sys.ps1 = str (datetime.datetime.now (). Time (). Isoformat () [: 8])
Since the invitation is not evaluated every time it is displayed, it only displays the time the shell was created and will not update it throughout its life.
I use version 3.5.1 more often - in case it matters.
Is there a way to get the shell to evaluate the prompt just before every time the prompt is displayed ?
Thanks for your answers and time.
source
share