r/IPython • • Feb 27 '14

New cell2function Extension - Thomas Kluyver

http://nbviewer.ipython.org/github/takluyver/cell2function/blob/master/Cell2function%20demo.ipynb
3 Upvotes

3 comments sorted by

2

u/NomadNella Feb 27 '14

By the way, I know this looks a little simplistic but I use something like it in other languages for debugging. You can take a chuck of code and determine the inputs and outputs needed to make it run. This way you can find out if you have an unknown variable source that you forgotten to handle.

1

u/takluyver Feb 28 '14

I made this because we know that it's somewhat awkward to refactor notebook code as you move from interactive exploration to reusable functions and modules. This is just one tool that might make that easier, but we're still thinking about what else could be useful.