breathe / NotebookScripter

Expose ipython jupyter notebooks as callbable functions or running scripts
MIT License
26 stars 1 forks source link

.py files should be invoked cell by cell? #3

Open breathe opened 5 years ago

breathe commented 5 years ago

Notebooks encoded into .py files (as by vscode-python extension) should detect cell boundaries (delineated via ‘# %%’) and execute the file in cell sized chunks. This is needed to best match the semantics of cell magic directives.

I didn’t implement this yet because I want to use compile() method to provide correct line mappings back to original source so that tools like debuggers work as expected when breakpoints are placed inside the target notebook file. I’m not sure yet how to support correct line mapping for debuggers while also exec’ing the cells one at a time ... for the moment I consider the debug ability more valuable but would like to fix this if can figure out how ...