Spice up those exceptions with cowexcept!
Project description
CowExcept
Spice up those exceptions with cowexcept!
______________________________________
< NameError: name 'baz' is not defined >
--------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Install
pip install cowexcept
Usage
All you have to do to get started is activate cowexcept
and then any
exceptions whenceforth will be in beautiful cowsay format:
>>> import cowexcept
>>> cowexcept.activate()
>>> 1/0
_______________________________________
/ Traceback (most recent call last): \
| File "...", line 1, in ... |
\ ZeroDivisionError: division by zero /
---------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
The cowexcept.activate()
call is to avoid unused import flags from IDEs or
style checkers and avoiding any import-time side effects. If unused imports and
import-time side effects do not bother you, and you would prefer to avoid the
horrible extra line used to explicitly activate cowexcept
,
use import cowexcept.auto
instead and this will activate cowexcept
on
import.
To deactivate cowexcept
call cowexcept.deactivate()
and any exceptions will
be handled as before.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cowexcept-1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 677dd1be9d30e4f055bbc88ce98664c68da31e5aaa77e8ebe26f80bee916964b |
|
MD5 | 371df2727367986851a35afde639338a |
|
BLAKE2b-256 | 4e1d62190eb279b6b935cec84c1387bf5ff37162afed8d1d35acc576a498dfdb |