MCPcopy Create free account
hub / github.com/ipython/ipython / CapturingDisplayPublisher

Class CapturingDisplayPublisher

IPython/core/displaypub.py:126–138  ·  view source on GitHub ↗

A DisplayPublisher that stores

Source from the content-addressed store, hash-verified

124
125
126class CapturingDisplayPublisher(DisplayPublisher):
127 """A DisplayPublisher that stores"""
128 outputs = List()
129
130 def publish(self, data, metadata=None, source=None, *, transient=None, update=False):
131 self.outputs.append({'data':data, 'metadata':metadata,
132 'transient':transient, 'update':update})
133
134 def clear_output(self, wait=False):
135 super(CapturingDisplayPublisher, self).clear_output(wait)
136
137 # empty the list, *do not* reassign a new list
138 self.outputs.clear()

Callers 1

__enter__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected