Table of Contents

IPython - Command History

About

Command history management

Management

Location

By default, the history file is named .ipython/profile_name/history.sqlite

Arrow

Variable In and out

In?
Type:        list
String form: ['', "print('Hello IPython')", '21 * 2', "def say_hello(name):\n    print('Hello {name}'.format(n <...> = range(10000)', 'max(x)')", "get_ipython().magic('lsmagic')", "get_ipython().magic('pinfo In')"]
Length:      12
Docstring:
list() -> new empty list
list(iterable) -> new list initialized from iterable's items

Shortcut variable

Magic

%pastebin 3 18-20 ~1/1-5

This will take line 3 and lines 18 to 20 from the current session, and lines 1-5 from the previous session.

Documentation / Reference