Qudi
Public Member Functions | Public Attributes | List of all members
display_trap.DisplayTrap Class Reference

Object to manage sys.displayhook. More...

Public Member Functions

def __init__ (self, hook=None)
 
def __enter__ (self)
 Enter a code segment where displayhook is set.
 
def __exit__ (self, type, value, traceback)
 Leave a code segmen swhere displayhook is unset. More...
 
def set (self)
 Set the hook. More...
 
def unset (self)
 Unset the hook. More...
 

Public Attributes

 old_hook
 
 hook
 

Detailed Description

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.

Member Function Documentation

◆ __exit__()

def display_trap.DisplayTrap.__exit__ (   self,
  type,
  value,
  traceback 
)

Leave a code segmen swhere displayhook is unset.

Parameters
type
value
traceback

◆ set()

def display_trap.DisplayTrap.set (   self)

Set the hook.

◆ unset()

def display_trap.DisplayTrap.unset (   self)

Unset the hook.


The documentation for this class was generated from the following file: