Show More
@@ -113,14 +113,22 b' def publish_display_data(data, metadata=None, source=None, transient=None, **kwa' | |||
|
113 | 113 | to specify metadata about particular representations. |
|
114 | 114 | source : str, deprecated |
|
115 | 115 | Unused. |
|
116 |
tra |
|
|
117 | A dictionary of transient data. | |
|
116 | transient : dict | |
|
117 | A dictionary of transient data, such as display_id. | |
|
118 | 118 | """ |
|
119 | 119 | from IPython.core.interactiveshell import InteractiveShell |
|
120 | InteractiveShell.instance().display_pub.publish( | |
|
120 | ||
|
121 | display_pub = InteractiveShell.instance().display_pub | |
|
122 | ||
|
123 | # only pass transient if supplied, | |
|
124 | # to avoid errors with older ipykernel. | |
|
125 | # TODO: We could check for ipykernel version and provide a detailed upgrade message. | |
|
126 | if transient: | |
|
127 | kwargs['transient'] = transient | |
|
128 | ||
|
129 | display_pub.publish( | |
|
121 | 130 | data=data, |
|
122 | 131 | metadata=metadata, |
|
123 | transient=transient, | |
|
124 | 132 | **kwargs |
|
125 | 133 | ) |
|
126 | 134 |
General Comments 0
You need to be logged in to leave comments.
Login now