https://github.com/pierlauro/pyjex
Java formatting for Python exceptions
https://github.com/pierlauro/pyjex
exception-messages exceptions python stacktrace
Last synced: about 1 year ago
JSON representation
Java formatting for Python exceptions
- Host: GitHub
- URL: https://github.com/pierlauro/pyjex
- Owner: pierlauro
- License: unlicense
- Created: 2018-02-22T20:38:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-27T22:10:26.000Z (over 8 years ago)
- Last Synced: 2025-02-26T03:35:34.408Z (over 1 year ago)
- Topics: exception-messages, exceptions, python, stacktrace
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
.. image:: http://img.shields.io/pypi/v/pyjex.svg
:target: https://pypi.python.org/pypi/pyjex
.. image:: https://img.shields.io/badge/python-2.x%20--%203.x-blue.svg
:target: https://github.com/pierlauro/pyjex
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
=======
.. code-block:: python
def divzero():
1/0
if __name__ == '__main__':
divzero()
**Normal stacktrace**:
.. code-block:: none
Traceback (most recent call last):
File "main.py", line 7, in
divzero()
File "main.py", line 4, in divzero
1/0
ZeroDivisionError: division by zero
**Stacktrace after importing pyjex**:
.. code-block:: none
ZeroDivisionError: division by zero
at divzero(main.py:4)
at (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/