Created
May 22, 2022 15:39
-
-
Save jonasrk/2cadc195c1b80c5cf853c514444d93cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myst-blogpost % python | |
Python 3.9.6 (default, Jul 29 2021, 11:06:22) | |
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import nbformat | |
>>> import nbclient | |
>>> with open('input.ipynb') as ipynb_file: | |
... nb = nbformat.read(ipynb_file, nbformat.NO_CONVERT) | |
... nb_ex = nbclient.execute(nb) | |
... | |
>>> with open("output.ipynb", "w") as ipynb_out_file: | |
... nbformat.write(nb, ipynb_out_file) | |
... | |
>>> | |
myst-blogpost % ls | |
input.ipynb input.myst output.ipynb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment