Make tracebacks from %paste show the code #865

Closed
asmeurer opened this Issue Oct 13, 2011 · 4 comments

Projects

None yet

4 participants

@asmeurer

If I just paste code into IPython and there is a traceback, it shows me where in the code the exception was raised. But if I use %paste (which is apparently more recommended), it does not do this.

@minrk
IPython member

I think just calling self.run_cell instead of going straight to exec should fix it.

@takluyver
IPython member
@minrk
IPython member

I think that's a good idea - there are only a few places where store_history=True is really what should happen. And it's not at all dangerous to accidentally have store_history=False, whereas inappropriate store_history=True makes a huge mess.

@takluyver takluyver added a commit to takluyver/ipython that referenced this issue Oct 14, 2011
@takluyver takluyver Use run_cell for %paste, instead of plain exec.
Closes gh-865, but introduces test failures for %cpaste
9281c5b
@takluyver
IPython member

See PR #878.

@takluyver takluyver added a commit that closed this issue Oct 15, 2011
@takluyver takluyver Use run_cell for %paste, instead of plain exec.
Closes gh-865, but introduces test failures for %cpaste
9281c5b
@takluyver takluyver closed this in 9281c5b Oct 15, 2011
@fperez fperez closed this in cdfc2e6 Oct 15, 2011
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
@takluyver takluyver Use run_cell for %paste, instead of plain exec.
Closes gh-865, but introduces test failures for %cpaste
18a77a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment