### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »

# Module: `core.display_trap`

A context manager for handling sys.displayhook.

Authors:

- Robert Kern
- Brian Granger

## 1 Class

class `IPython.core.display_trap.``DisplayTrap`(hook=None)

  Bases: `IPython.config.configurable.Configurable`

  Object to manage sys.displayhook.

  This came from IPython.core.kernel.display_hook, but is simplified (no callbacks or formatters) until more of the core is refactored.

  `__init__`(hook=None)
  `set`()

    Set the hook.

  `unset`()

    Unset the hook.

### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »