IPython Notebook comes with nbconvert, which can export notebooks to other formats. But how do I convert text in the opposite direction? I ask because I already ha
very old question, i know. but there is jupytext (also available on pypi) that can convert from ipynb to several formats and back.
when jupytext is installed you can use
$ jupytext --to notebook test.py
in order to generate test.ipynb.
jupytext has a lot more interesting features that can come in handy when working with notebooks.
here is a more recent question on that topic.