<div dir="ltr">Is there a project that converts python code to a notebook? I have some simple code [1]  that just wraps the code in a cell, and signs it, but I could image lots of useful options: breaking up into cells (based on indentation), turning comment blocks into markdown sells, special conversion commands in comments, etc.<div>
<br></div><div>I have a large number of example files that it would be handy to automate the conversion and end up with useful notebooks for further editing and demonstrations. This could also be handy for a generic "Save as Notebook" option in Python editors.</div>
<div><br></div><div>It could even allow .py files (or other languages) to appear in the notebook file listings, and allow automatic conversion to a notebook on selection (at least when talking to a kernel server).</div><div>
<br></div><div>Thanks for any pointers,</div><div><br></div><div>-Doug</div><div><br></div><div>[1] - <a href="https://bitbucket.org/ipre/calico/src/master/notebooks/code2notebook.py">https://bitbucket.org/ipre/calico/src/master/notebooks/code2notebook.py</a></div>
</div>