attest icon indicating copy to clipboard operation
attest copied to clipboard

Configurable list of import names to hide from tracebacks

Open dag opened this issue 13 years ago • 0 comments

Using something like,

dict((os.path.abspath(mod.__file__), name)
    for name, mod in sys.modules.iteritems()
    if hasattr(mod, '__file__'))

we can map files to modules, and use that to match lines in tracebacks against a 'blacklist' of module globs to hide. Use internally for traceback cleaning and maybe expose publicly if it seems useful.

dag avatar Apr 21 '11 17:04 dag