Skip to content

Commit

Permalink
Merge pull request ipython#1599 from takluyver/run-d-py3
Browse files Browse the repository at this point in the history
Fix for %run -d on Python 3.

Closes ipythongh-1421.
  • Loading branch information
fperez committed Apr 15, 2012
2 parents 9bf262d + cfbe2c4 commit a969ae8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion IPython/core/magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a969ae8

Please sign in to comment.