The "run" command for running python scripts:
* -t to print timing information
* -p to print profiling info from profiler module
* -d run the script under pdb interactively (with -b to set line breakpoints)
* -n to set __name__
All of these things can be done fairly easily on their own, but doing it through IPython makes the output so much easier to read and work with.
Whenever I'm working with data I need to visualize, I like to use:
ipython qtconsole --pylab=inline
%run -n foo.py
You can't set __name__ to arbitrary values. It's either '__main__' like when running a script, or (with -n) the module name, like when performing an import.
The "run" command for running python scripts:
* -t to print timing information
* -p to print profiling info from profiler module
* -d run the script under pdb interactively (with -b to set line breakpoints)
* -n to set __name__
All of these things can be done fairly easily on their own, but doing it through IPython makes the output so much easier to read and work with.
Whenever I'm working with data I need to visualize, I like to use:
to get a terminal-like window that has inline graphs from matplotlib functions.