sys.stderr and sys.excepthook can be None at interpreter shutdown, in which case display the appropriate error message. (part of #5319)
sys.stderr and sys.excepthook can be None at interpreter shutdown,
in which case display the appropriate error message.
(part of #5319)

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator