aroberge / friendly

Aimed at Python beginners: replacing standard traceback by something easier to understand
https://friendly-traceback.github.io/docs/index.html
MIT License
325 stars 9 forks source link

Exclude additional file when using IPython's run #208

Closed aroberge closed 3 years ago

aroberge commented 3 years ago

When using friendly and running a file with IPython's "magic" run command, the traceback contains a line that should be omitted.

Traceback (most recent call last):                                             
  File "...\IPython\utils\py3compat.py", line 168, in execfile           
    exec(compiler(f.read(), fname, 'exec'), glob, loc)                         
...

This will have to be done as a special case since excluding files from traceback normally requires to know the entire path, but this can vary in this case.