Skip to content

Instantly share code, notes, and snippets.

from IPython.core import ipapi
def istore():
'''Extracts all variable names used in assignments from the input history
and stores them.'''
ipy = ipapi.get()
for v in assignees(assignments(ipy.history_manager.input_hist_raw)):
try:
ipy.magic('store %s' % v)
except: