Permalink
Browse files

Fix for %run -d on Python 3

Closes gh-1421
  • Loading branch information...
1 parent 47367a0 commit 3e1a50920938062a78c3dbab83366dc50c1f2d2d @takluyver committed Apr 15, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 IPython/core/magic.py
View
3 IPython/core/magic.py
@@ -1786,8 +1786,9 @@ def magic_run(self, parameter_s ='', runner=None,
# Start file run
print "NOTE: Enter 'c' at the",
print "%s prompt to start your script." % deb.prompt
+ ns = {'execfile': py3compat.execfile, 'prog_ns': prog_ns}
try:
- deb.run('execfile("%s")' % filename, prog_ns)
+ deb.run('execfile("%s", prog_ns)' % filename, ns)
except:
etype, value, tb = sys.exc_info()

0 comments on commit 3e1a509

Please sign in to comment.