scistag.vislog.visual_log_element_context.VisualLogElementContext

class VisualLogElementContext(builder, closing_code)[source]

Bases: object

Defines a context which helps to dynamically fill advanced components such as HTML tables or divs with content.

This is realized by asap storing their opening statements into the target document such as <table> upon creation and automatically writing the closing statement such as </table> when either the object’s context is left or the close() method is called explicitly.

Parameters

builder – The builder object with which we write to the log

Methods

close

Can be called to explicitly finish the current element

Attributes

__dict__

__doc__

__module__

__weakref__

list of weak references to the object (if defined)

close()[source]

Can be called to explicitly finish the current element