[SciPy-User] Pylab - standard packages
Sat Sep 22 11:41:48 CDT 2012
On 22 September 2012 16:22, Lou Pecora <email@example.com> wrote:
> I bring this up because as cool as IPython is, I have never found a good way to use it for my style of research/development. I often just run from scripts instead since the code has to be continually re-interpreted (I'm assuming Python here) and IPython seems to put up road blocks to using software while modifying it. At least I haven't found a way to do it. If you could do that seamlessly, that would be a big advance!
Well, that's definitely the sort of use case we're thinking about - a
mixture of developing code and doing research with it. A few ideas
about how you can use code and modify it, depending on the size of the
- Small functions/classes can live in a notebook cell: modify it and
rerun the cell to redefine it.
- For scripts, you can use the %run magic function. It works a lot
like running 'python script.py' at a command line, but when something
goes wrong, you get a much better traceback, and a %debug magic
command will drop you into the debugger. There's also a %edit magic
function to edit a file.
- You can import code and use the autoreload extension  to reload
the modules every time you change them.
- If you have a lot of modules importing from one another, there's a
deepreload function  that will reload all of them in one go.
I hope that gives you some ideas.
More information about the SciPy-User