Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for %run -d on Python 3 #1599

Merged
merged 1 commit into from

3 participants

Thomas Kluyver Julian Taylor Fernando Perez
Thomas Kluyver
Owner

Supersedes PR #1452.

Closes gh-1421

Thomas Kluyver takluyver referenced this pull request
Closed

Bug fix for approval #1452

Julian Taylor
Collaborator

this should also be applied to the 0.12.1 branch

Thomas Kluyver
Owner

Good point - once this is OKed, I'll do it on that branch too.

Fernando Perez
Owner

Looks clean, thanks @takluyver! I'll merge in master now, and will leave it to you to apply the patch to the 0.12.1 branch.

Fernando Perez fperez merged commit 9b9fb9e into from
Thomas Kluyver
Owner

Done for 0.12.1 in commit d457204.

Fernando Perez
Owner

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 15, 2012
  1. Thomas Kluyver

    Fix for %run -d on Python 3

    takluyver authored
    Closes gh-1421
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  IPython/core/magic.py
3  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()
Something went wrong with that request. Please try again.