| 1 | initial version |
IPython's %history magic command is probably what you're looking for. It has a -f option to redirect to a file. See %history? for the relevant documentation. It may not be formatted exactly how you want, but it should get you pretty close.
An alternative is to run inside an emacs buffer or "screen" and use its save functions.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.