##// END OF EJS Templates
Load whole history on `%load` without parameters
Blazej Michalik -
Show More
@@ -308,6 +308,9 b' class CodeMagics(Magics):'
308 308 where source can be a filename, URL, input history range, macro, or
309 309 element in the user namespace
310 310
311 If no arguments are given, loads the history of this session up to this
312 point.
313
311 314 Options:
312 315
313 316 -r <lines>: Specify lines or ranges of lines to load from the source.
@@ -326,6 +329,7 b' class CodeMagics(Magics):'
326 329 confirmation before loading source with more than 200 000 characters, unless
327 330 -y flag is passed or if the frontend does not support raw_input::
328 331
332 %load
329 333 %load myscript.py
330 334 %load 7-27
331 335 %load myMacro
@@ -337,13 +341,7 b' class CodeMagics(Magics):'
337 341 %load -n my_module.wonder_function
338 342 """
339 343 opts,args = self.parse_options(arg_s,'yns:r:')
340
341 if not args:
342 raise UsageError('Missing filename, URL, input history range, '
343 'macro, or element in the user namespace.')
344
345 344 search_ns = 'n' in opts
346
347 345 contents = self.shell.find_user_code(args, search_ns=search_ns)
348 346
349 347 if 's' in opts:
General Comments 0
You need to be logged in to leave comments. Login now