Skip to content

Commit

Permalink
Displaying object repr if process_object returns an error
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Apr 13, 2017
1 parent 455d2bd commit 7997094
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions holoviews/ipython/display_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def process_object(obj):

def render(obj, **kwargs):
info = process_object(obj)
if info: return info
if info:
IPython.display.display(IPython.display.HTML(info))
return


if render_anim is not None:
return render_anim(obj)
Expand Down Expand Up @@ -161,7 +164,10 @@ def wrapped(element):
@display_hook
def element_display(element, max_frames, max_branches):
info = process_object(element)
if info: return info
if info:
IPython.display.display(IPython.display.HTML(info))
return


backend = Store.current_backend
if type(element) not in Store.registry[backend]:
Expand Down Expand Up @@ -258,7 +264,10 @@ def element_png_display(element, max_frames, max_branches):
if 'png' not in Store.display_formats:
return None
info = process_object(element)
if info: return info
if info:
IPython.display.display(IPython.display.HTML(info))
return


backend = Store.current_backend
if type(element) not in Store.registry[backend]:
Expand All @@ -280,7 +289,10 @@ def element_svg_display(element, max_frames, max_branches):
if 'svg' not in Store.display_formats:
return None
info = process_object(element)
if info: return info
if info:
IPython.display.display(IPython.display.HTML(info))
return


backend = Store.current_backend
if type(element) not in Store.registry[backend]:
Expand Down

0 comments on commit 7997094

Please sign in to comment.