ipython/ipython — pull request #6965 by takluyver (2014-11-18 02:02:27+00:00)
Title: Allow run_line_magic to be called from scripts

Don't blow up if looking back up the stack trace fails.

Reported on rpy2: https://bitbucket.org/lgautier/rpy2/issue/184/valueerror-call-stack-is-not-deep-enough