MCPcopy Create free account
hub / github.com/ipython/ipython / refresh_variables

Function refresh_variables

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

Source from the content-addressed store, hash-verified

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

Callers 1

restore_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected