Changeset 2506:d8c60686fe62 in livinglogic.python.xist

Show
Ignore:
Timestamp:
04/26/06 00:04:19 (14 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

The displayhook can now be disabled by setting the presenter to None.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • _xist/presenters.py

    r2505 r2506  
    10241024 
    10251025 
    1026 defaultpresenter = CodePresenter # used in the displayhook below 
     1026# used by the IPython displayhook below (set to None to disable) 
     1027defaultpresenter = CodePresenter 
    10271028 
    10281029try: 
     
    10341035if api is not None: 
    10351036    def displayhook(self, obj): 
    1036         if isinstance(obj, xsc.Node): 
     1037        if isinstance(obj, xsc.Node) and defaultpresenter is not None: 
    10371038            (defaultpresenter(obj) | ipipe.defaultdisplay).display() 
    10381039        raise ipapi.TryNext