MCPcopy Index your code
hub / github.com/ipython/ipython / refresh_variables

Function refresh_variables

IPython/extensions/storemagic.py:35–47  ·  view source on GitHub ↗
(ip)

Source from the content-addressed store, hash-verified

33
34
35def refresh_variables(ip):
36 db = ip.db
37 for key in db.keys('autorestore/*'):
38 # strip autorestore
39 justkey = os.path.basename(key)
40 try:
41 obj = db[key]
42 except KeyError:
43 print("Unable to restore variable '%s', ignoring (use %%store -d to forget!)" % justkey)
44 print("The error was:", sys.exc_info()[0])
45 else:
46 # print("restored",justkey,"=",obj) # dbg
47 ip.user_ns[justkey] = obj
48
49
50def restore_dhist(ip):

Callers 1

restore_dataFunction · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…