I'm trying hard to like IPython Notebook, but maybe because I'm so used to writing code in vi and executing it at the command line I'm finding some of its defaults challenging. Can anything be done (perhaps in a configuration file somewhere) about the following?
- I'd like
%histto output line numbers by default without having to remember the-nand without having to set up an alias every time. - How do I set
%automagicto "off" by default to stop IPython polluting my namespace with its un-percented magics and shell commands? I know I can use the--no-import-alloption with--pylaboption: is there an equivalent--no-automagicoption? - It drives me mad that I'm never quite sure what is the status of the objects bound to my variable names: changing and running a cell beneath the one I'm using can alter an object I'm referring to in the current cell. To avoid this, I've got into the habit of using Run All or Run All Above, but that sometimes repeats lengthy calculations and reimports stuff I'd rather not bother with: can I flag some cells to be not-rerun by Run All?
- Can I get vi-style key-bindings for editing cells?
- Why does IPython notebook hang my browser if the kernel is using lots of memory? I thought they were separate processes with the kernel just reporting back its results.
asked Dec 12, 2014 at 14:37
xnx
25.7k11 gold badges75 silver badges118 bronze badges
1 Answer 1
(Please try to ask one question per question - SO is designed to work that way. However, I'm not feeling so mean that I'd refuse to answer)
- I don't think the behaviour of
%histis configurable, sorry. - Set
c.InteractiveShell.automagic = Falsein your config files. - There has been some discussion of a
%%cachecell magic that could avoid re-running long running cells by storing values computed in that cell. It has not been implemented yet, though. - Yes: https://github.com/ivanov/ipython-vimception
- It shouldn't hang just because of kernel memory use - if your code is producing a lot of output, though, that can hang the browser because adding lots of things to the DOM gums it up.
answered Dec 15, 2014 at 19:38
Thomas K
40.7k7 gold badges88 silver badges89 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
xnx
Thank you. I think
%%cache would be a great idea.lang-py