##// END OF EJS Templates
Make %paste use 'exec' instead of runlines (more reliable)
vivainio -
Show More
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Magic functions for InteractiveShell.
2 """Magic functions for InteractiveShell.
3
3
4 $Id: Magic.py 1068 2006-01-23 20:31:43Z vivainio $"""
4 $Id: Magic.py 1069 2006-01-23 21:07:28Z vivainio $"""
5
5
6 #*****************************************************************************
6 #*****************************************************************************
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -2793,7 +2793,7 b' Defaulting color scheme to \'NoColor\'"""'
2793 #print "block:\n",block
2793 #print "block:\n",block
2794 if not par:
2794 if not par:
2795 b = textwrap.dedent(block)
2795 b = textwrap.dedent(block)
2796 self.runsource(b)
2796 exec b in self.user_ns
2797 self.user_ns['pasted_block'] = b
2797 self.user_ns['pasted_block'] = b
2798 else:
2798 else:
2799 self.user_ns[par] = block
2799 self.user_ns[par] = block
General Comments 0
You need to be logged in to leave comments. Login now