Skip to content

pierlauro/pyjex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyjex: PYthon → Java formatting for EXceptions

A simple one-liner to format Python's stracktraces in Java style.

Usage

Simply import pyjex in your code and enjoy.

Example

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)

Installing

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/

Releases

No releases published

Packages

No packages published

Languages