fix minor bugs in export as (nbconvert) example

This commit is contained in:
jdavidheiser 2014-04-02 09:56:36 -07:00
parent 17bbc2b360
commit cdae251186

View File

@ -20,6 +20,8 @@
"from IPython.nbconvert import get_export_names, export_by_name\n",
"from IPython.nbconvert.writers import FilesWriter\n",
"from IPython.nbformat import current"
"from IPython.nbconvert.utils.exceptions import ConversionException\n",
],
"language": "python",
"metadata": {},
@ -151,7 +153,7 @@
" download_link.value = \"<br>Results: <a href='files/{filename}'><i>\\\"{filename}\\\"</i></a>\".format(filename=write_results)\n",
" download_link.visible = True\n",
" \n",
"def handle_export():\n",
"def handle_export(widget):\n",
" with open(filename, 'r') as f:\n",
" export(filename, current.read(f, 'json'))\n",
"export_button.on_click(handle_export)"