##// END OF EJS Templates
ileo: _p does not get erased with recursive ipush / wb.require()
Ville M. Vainio -
Show More
@@ -395,9 +395,13 b' def push_ipython_script(node):'
395 hstart = len(ip.IP.input_hist)
395 hstart = len(ip.IP.input_hist)
396 script = node.script()
396 script = node.script()
397
397
398 # The current node _p needs to handle wb.require() and recursive ipushes
399 old_p = ip.user_ns.get('_p',None)
398 ip.user_ns['_p'] = node
400 ip.user_ns['_p'] = node
399 ip.runlines(script)
401 ip.runlines(script)
400 ip.user_ns.pop('_p',None)
402 ip.user_ns['_p'] = old_p
403 if old_p is None:
404 del ip.user_ns['_p']
401
405
402 has_output = False
406 has_output = False
403 for idx in range(hstart,len(ip.IP.input_hist)):
407 for idx in range(hstart,len(ip.IP.input_hist)):
General Comments 0
You need to be logged in to leave comments. Login now