ff18abfe1696d5805b7f0a73f0d7a19d6281314e,pysos/kernel.py,SoS_Kernel,handle_magic_preview,#SoS_Kernel#Any#,839
Before Change
def handle_magic_preview(self, options):
try:
new_options = interpolate(options, sigil="${ }", local_dict=env.sos_dict._dict)
if new_options != options:
options = new_options
self.send_response(self.iopub_socket, "stream",
{"name": "stdout", "text":
"%preview {}\n//// -- End interpolated command --\n".format(new_options.strip())})
except Exception as e:
self.send_response(self.iopub_socket, "stream",
{"name": "stdout", "text": "Failed to interpolate {}: {}\n".format(short_repr(options), e)})
self.send_response(self.iopub_socket, "stream",
After Change
items = shlex.split(options)
if not items:
return
self.send_response(self.iopub_socket, "display_data",
{
"source": "SoS",
"metadata": {},
"data": { "text/html": HTML("<pre>//// -- %preview {} --</pre>".format(options)).data}
})
// expand items
for item in items:
self.preview(item)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: vatlab/SoS
Commit Name: ff18abfe1696d5805b7f0a73f0d7a19d6281314e
Time: 2016-11-08
Author: ben.bog@gmail.com
File Name: pysos/kernel.py
Class Name: SoS_Kernel
Method Name: handle_magic_preview
Project Name: vatlab/SoS
Commit Name: 8d1f2876790f15a2d085345a805a90897ed943ac
Time: 2016-11-10
Author: ben.bog@gmail.com
File Name: pysos/kernel.py
Class Name: SoS_Kernel
Method Name: handle_magic_show
Project Name: vatlab/SoS
Commit Name: ff18abfe1696d5805b7f0a73f0d7a19d6281314e
Time: 2016-11-08
Author: ben.bog@gmail.com
File Name: pysos/kernel.py
Class Name: SoS_Kernel
Method Name: run_sos_code