March 2003
Intermediate to advanced
656 pages
39h 30m
English
displayhook
displayhook(value)In interactive sessions, the Python interpreter calls
displayhook, passing it the result of each
expression-statement entered. The default
displayhook does nothing if
value is None,
otherwise it preserves and displays value:
ifvalueis not None: __builtin__._ =valueprint repr(value)
You can rebind sys.displayhook in order to change
interactive behavior. The original value is available as
sys.__displayhook__.
Read now
Unlock full access