How to load/edit/run/save text files (.py) into an IPython notebook cell?

I’ve recently moved over to using IPython notebooks as part of my workflow. However, I’ve not been successful in finding a way to import .py files into the individual cells of an open IPython notebook so that they can edited, run and then saved. Can this be done?

I’ve found this in the documentation which tells me how to import .py files as new notebooks but this falls short of what I want to achieve.

Any suggestions would be much appreciated.

6 Answers
6

Leave a Comment