Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • How do you go from the .py file back to a notebook? I like this approach, but because .ipynb -> .py -> .ipynb is potentially lossy, I did not consider this seriously.
    – mforbes
    Commented Jul 22, 2014 at 21:31
  • That is easy: load it, by example by dropping it on de Notebook-dashboard. Except of "output data" nothing is lost
    – Albert
    Commented Jul 25, 2014 at 13:34
  • If that is true, then I think this would be close to idea, but I seem to recall that IPython made no commitment to completely preserving data in the transition from .py to .ipynb formats. There is an issue about this – so perhaps this will form the basis for a complete solution.
    – mforbes
    Commented Jul 27, 2014 at 0:10
  • I am having some difficult converting from .py files to .ipynb files. nbconvert does not yet seem to support this, and I do not have a notebook dashboard since I run ipython notebook manually. Do you have any general suggestions about how to implement this backwards conversion?
    – mforbes
    Commented Aug 9, 2014 at 2:50
  • Surely the .py-to-notebook transformation is not intended to round-trip. So this can't really be a general solution though it's nice it works for you.
    – holdenweb
    Commented Aug 14, 2014 at 17:40