iPython Cheatsheet

Nov 30, 2018

Code Reload

Automatic code reload if source changed:

In [1]: %load_ext autoreload

In [2]: %autoreload 2

In [3]: import my_module

In [4]:

Dumping Session History

Save command history from current session to file:

In [1]: print("Hello")

In [2]: %history -f history.py
Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.