• Douglas's avatar
    Jupyter: automatic rendering of objects as HTML · d67f9a7f
    Douglas authored
    Rendering of last-returning objects wasn't implemented using a custom display
    hook, like in IPyKernel, because it is not thread-safe. Instead user's code is
    modified to call an external method, Base_renderAsHtml, with the object as
    argument to render it. This external method can be called manually as the user
    wishes.
    
    To render a object of a given class a processor needs to be created and
    associated with that class. When the class has no processor, the default one is
    used to render the object's string representation. Many processors were created
    for some special classes: Image class from the Image Module, Figure class from
    matplotlib and all the IPython's display objects classes (Audio, IFrame,
    YouTubeVideo, VimeoVideo, ScribdDocument, FileLink, and FileLinks).
    
    The user can manually add processors as he likes using the `_processor_list`
    object that is automatically injected into the code context.
    d67f9a7f
test.erp5.testExecuteJupyter.xml 3.61 KB