Show More
@@ -100,8 +100,8 b' class StoreMagics(Magics):' | |||||
100 | * ``%store -z`` - Remove all variables from storage |
|
100 | * ``%store -z`` - Remove all variables from storage | |
101 | * ``%store -r`` - Refresh all variables from store (delete |
|
101 | * ``%store -r`` - Refresh all variables from store (delete | |
102 | current vals) |
|
102 | current vals) | |
103 |
* ``%store -r spam`` |
|
103 | * ``%store -r spam bar`` - Refresh specified variables from store | |
104 | current val) |
|
104 | (delete current val) | |
105 | * ``%store foo >a.txt`` - Store value of foo to new file a.txt |
|
105 | * ``%store foo >a.txt`` - Store value of foo to new file a.txt | |
106 | * ``%store foo >>a.txt`` - Append value of foo to file a.txt |
|
106 | * ``%store foo >>a.txt`` - Append value of foo to file a.txt | |
107 |
|
107 | |||
@@ -136,13 +136,13 b' class StoreMagics(Magics):' | |||||
136 |
|
136 | |||
137 | elif 'r' in opts: |
|
137 | elif 'r' in opts: | |
138 | if args: |
|
138 | if args: | |
|
139 | for arg in args: | |||
139 | try: |
|
140 | try: | |
140 |
obj = db['autorestore/' + arg |
|
141 | obj = db['autorestore/' + arg] | |
141 | except KeyError: |
|
142 | except KeyError: | |
142 |
print " |
|
143 | print "no stored variable %s" % arg | |
143 | print "The error was:", sys.exc_info()[0] |
|
|||
144 | else: |
|
144 | else: | |
145 |
ip.user_ns[arg |
|
145 | ip.user_ns[arg] = obj | |
146 | else: |
|
146 | else: | |
147 | refresh_variables(ip) |
|
147 | refresh_variables(ip) | |
148 |
|
148 |
General Comments 0
You need to be logged in to leave comments.
Login now