Permalink
Browse files

Merge pull request #1599 from takluyver/run-d-py3

Fix for %run -d on Python 3.

Closes gh-1421.
  • Loading branch information...
fperez committed Apr 15, 2012
2 parents ae222d0 + 3e1a509 commit 9b9fb9e73fe7451a454309d244e575b362096a83
Showing with 2 additions and 1 deletion.
  1. +2 −1 IPython/core/magic.py
View
@@ -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 9b9fb9e

Please sign in to comment.