Skip to content

Commit

Permalink
update notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
kolibril13 committed Oct 27, 2022
1 parent e8dd9d1 commit 64a07b7
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions jupyterlite_capture_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"outputs": [],
"source": [
"import micropip # only for JupyterLite\n",
"await micropip.install(\"jupyter-capture-output\")"
"%pip install jupyter-capture-output==0.0.6 \n",
"# this only works since Jupyterlite jupyterlite==0.1.0b14"
]
},
{
Expand All @@ -32,18 +32,7 @@
"metadata": {},
"outputs": [],
"source": [
"import pkg_resources # only for JupyterLite"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c3170e55-2d13-40ee-8d79-87cd2a906a98",
"metadata": {
"trusted": true
},
"outputs": [],
"source": [
"import pkg_resources\n",
"import jupyter_capture_output"
]
},
Expand All @@ -60,17 +49,6 @@
"print(\"Hello World\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e80a8dae",
"metadata": {},
"outputs": [],
"source": [
"%%capture_code --path \"cell_content.py\"\n",
"print(\"Hello World\")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -88,6 +66,17 @@
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "de56dace",
"metadata": {},
"outputs": [],
"source": [
"# %%capture_code --path \"cell_content.py\" ## only in version 0.0.8\n",
"# print(\"Hello World\")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -97,7 +86,7 @@
"source": [
"from pathlib import Path\n",
"Path(\"greeting.txt\").unlink() # for deleting\n",
"Path(\"cell_content.py\").unlink()\n",
"# Path(\"cell_content.py\").unlink()\n",
"Path(\"dog.png\").unlink() "
]
}
Expand All @@ -110,7 +99,7 @@
},
"language_info": {
"codemirror_mode": {
"name": "python",
"name": "ipython",
"version": 3
},
"file_extension": ".py",
Expand Down

0 comments on commit 64a07b7

Please sign in to comment.