Make traceback easier to see for xonsh.
Python work very often with large libraries like pandas, or matplotlib. This means that exceptions often produce long stack traces. Since we don't need to see the library detail in the vast majority of cases. Especially with a shell like xonsh.
This xontrib making readable and short traceback.
example: Simple division by zero error.
example: This simple pandas error produces a stacktrace containing 28 lines. But xontrib load...
Install using pip
pip install xontrib-readable-traceback
xontrib load readable-traceback
This xontrib use backtrace package.
For the main usage, please refer to the following.
~~~ xontrib load readable-traceback $READABLE_TRACE_STRIP_PATH_ENV=True $READABLE_TRACE_REVERSE=True ~~~
The correspondence with the variable of backtrace is as follows.
If we want to turn trace off, we can use:
If so, the notation of traceback follows xonsh_env(
Xonsh traceback log
Xonsh can keep a log of traceback.
To keep the log, write
"ABSOLUTE PATH TO TRACEBACK LOG" below.
If it is None, no log is kept. Default is None.
I appreciate all Python's assets and xonsh.
If there is something problem, up to github issue.