##// END OF EJS Templates
%edit: doing %edit pasted_block will store new value for pasted_block (originally created by %cpaste)
Ville M. Vainio -
Show More
@@ -2329,6 +2329,12 b' Currently the magic system has the following functions:\\n"""'
2329 2329 print 'Editing...',
2330 2330 sys.stdout.flush()
2331 2331 self.shell.hooks.editor(filename,lineno)
2332
2333 # XXX TODO: should this be generalized for all string vars?
2334 # For now, this is special-cased to blocks created by cpaste
2335 if args.strip() == 'pasted_block':
2336 self.shell.user_ns['pasted_block'] = file_read(filename)
2337
2332 2338 if opts.has_key('x'): # -x prevents actual execution
2333 2339 print
2334 2340 else:
@@ -2338,6 +2344,8 b' Currently the magic system has the following functions:\\n"""'
2338 2344 else:
2339 2345 self.shell.safe_execfile(filename,self.shell.user_ns,
2340 2346 self.shell.user_ns)
2347
2348
2341 2349 if use_temp:
2342 2350 try:
2343 2351 return open(filename).read()
General Comments 0
You need to be logged in to leave comments. Login now