(ip)
| 33 | |
| 34 | |
| 35 | def 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 | |
| 50 | def restore_dhist(ip): |
no test coverage detected
searching dependent graphs…