A simple one-liner to format Python's stracktraces in Java style.
Simply import pyjex
in your code and enjoy.
def divzero():
1/0
if __name__ == '__main__':
divzero()
Normal stacktrace:
Traceback (most recent call last):
File "main.py", line 7, in <module>
divzero()
File "main.py", line 4, in divzero
1/0
ZeroDivisionError: division by zero
Stacktrace after importing pyjex:
ZeroDivisionError: division by zero
at divzero(main.py:4)
at <module>(main.py:7)
pip install pyjex
- no dependencies needed.
This is free and unencumbered software released into the public domain. For more information, please refer to http://unlicense.org/