IPython Cheat Sheet
This cheat sheet provides a quick reference for useful IPython magic commands.
Working with IPython Profiles
Creating and Using Profiles
# Create a ipython profile
ipython profile create profile_name
# Use specified profile
ipython --profile=${profile_name}
Inspecting Your Workspace
Listing Defined Objects
%who
Managing Code
Creating and Running Macros
%macro
Using an External Editor
%edit
Exploring IPython's Capabilities
Listing Magic Commands
%lsmagic
Persistent Storage
%store
Debugging
Automatic Debugging
%pdb
Timing and Performance
Timing Expressions
%time
%timeit
Logging
Logging Input/Output
%logstart
%logon
%logoff
%logstate
Navigation
Directory Management
%cd
%pushd
%popd
%bookmark
Environment Control
Resetting the Environment
%reset
History
Viewing and Searching History
%hist
%hist -g somestring
Aliases
Listing Aliases
%alias
Embedding IPython
Embedding in Python Code
from IPython import embed; embed()