Skip to content
Permalink
Browse files

update notebook_runner to deal with widgets

  • Loading branch information...
sdpython committed May 14, 2015
1 parent 74013ac commit 868ead323f953e8141409290350d8873eb191a33
@@ -1022,21 +1022,23 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"last_name=widgets.Text(description=\"Last Name\")\n",
"first_name=widgets.Text(description=\"First Name\")\n",
"from IPython.display import display \n",
"from IPython.html.widgets import Text\n",
"last_name = Text(description=\"Last Name\")\n",
"first_name = Text(description=\"First Name\")\n",
"display(last_name)\n",
"display(first_name)"
]
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 5,
"metadata": {
"collapsed": false
},
@@ -1047,7 +1049,7 @@
"('Xavier', 'Dupré')"
]
},
"execution_count": 35,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -243,9 +243,16 @@ def run_cell(self, index_cell, cell, clean_function=None):
outs = list()
continue

elif msg_type == 'comm_open' or msg_type == 'comm_msg':
# widgets in a notebook
out.data = content["data"]
out.comm_id = content["comm_id"]

else:
dcontent = "\n".join("{0}={1}".format(k, v)
for k, v in sorted(content.items()))
raise NotImplementedError(
'unhandled iopub message: %s' % msg_type)
'unhandled iopub message: %s' % msg_type + "\nCONTENT:\n" + dcontent)

outs.append(out)

0 comments on commit 868ead3

Please sign in to comment.
You can’t perform that action at this time.