0

I have a .py file with code blocks separated in cells by #%% for example

#%%
block1
#%%
block2

This appears to be quite similar to ipynb cells; is there a quick way to convert such a python file to and from ipynb (while preserving the cells format)?

Simon Provost
  • 356
  • 1
  • 2
  • 15
dshri
  • 537
  • 1
  • 5
  • 14
  • Would this thread help your issue: https://stackoverflow.com/a/21034906/9814037 ? – Simon Provost Nov 23 '21 at 09:34
  • i want a mapping between python's cell to ipynb cell, that link gives option to load a file as a cell in ipynb – dshri Nov 23 '21 at 10:14
  • Maybe a bit unrelated, but you might be interested on having a look on [papermill](https://github.com/nteract/papermill) – deponovo Nov 23 '21 at 10:42
  • As far as I recall, I have not seen such a thing in a package management (apt/brew). As a result, I suppose you should create something open source on GitHub. – Simon Provost Nov 23 '21 at 12:52

0 Answers0