I\'m working on a Python library used by third-party developers to write extensions for our core application.
I\'d like to know if it\'s possible to modify the trace
You might also be interested in PEP-3134, which is implemented in python 3 and allows you to tack one exception/traceback onto an upstream exception.
This isn't quite the same thing as modifying the traceback, but it would probably be the ideal way to convey the "short version" to library users while still having the "long version" available.