# Module for colorful printing and error handling.
## pip install exceptdrucker
### Tested against Windows 10 / Python 3.11 / Anaconda
```PY
Module for colorful printing and error handling.
Handle and display errors in a customizable format.
Args:
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
debug (bool): Indicates whether debugging is enabled. Defaults to True.
symbol_top (str): Symbol to print at the top of the error message. Defaults to "╦".
symbol_bottom (str): Symbol to print at the bottom of the error message. Defaults to "╩".
len_top (str): Length of the top symbol line. Defaults to "60".
len_bottom (str): Length of the bottom symbol line. Defaults to "60".
color_top (str): Color of the top symbol line. Defaults to "YELLOW_DARK".
color_bottom (str): Color of the bottom symbol line. Defaults to "RED_DARK".
print_to_stderr (bool): Whether to print to stderr. Defaults to False.
color_exception (str): Color of the exception message. Defaults to "CYAN".
Example:
from exceptdrucker import errwrite, config
try:
print("hello" / 2)
except Exception:
errwrite()
try:
print("hello" / 2)
except Exception:
errwrite(
debug=True,
symbol_top="V",
symbol_bottom="A",
len_top="40",
len_bottom="40",
color_top="YELLOW",
color_bottom="RED",
choosen_color="BLUE",
print_to_stderr=False,
color_exception="WHITE",
)
try:
print("hello" / 2)
except Exception:
errwrite(
debug=False,
)
config.debug = False
try:
print("hello" / 2)
except Exception:
print("nothing")
errwrite()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/exceptdrucker",
"name": "exceptdrucker",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "error, exception",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a4/a2/2a7ef51fa4f560545387175c52394324119a615f75a79edc94ab65ee6e6c/exceptdrucker-0.10.tar.gz",
"platform": null,
"description": "\r\n# Module for colorful printing and error handling.\r\n\r\n## pip install exceptdrucker\r\n\r\n### Tested against Windows 10 / Python 3.11 / Anaconda\r\n\r\n\r\n```PY\r\n Module for colorful printing and error handling.\r\n Handle and display errors in a customizable format.\r\n\r\n Args:\r\n *args: Variable length argument list.\r\n **kwargs: Arbitrary keyword arguments.\r\n debug (bool): Indicates whether debugging is enabled. Defaults to True.\r\n symbol_top (str): Symbol to print at the top of the error message. Defaults to \"\u2566\".\r\n symbol_bottom (str): Symbol to print at the bottom of the error message. Defaults to \"\u2569\".\r\n len_top (str): Length of the top symbol line. Defaults to \"60\".\r\n len_bottom (str): Length of the bottom symbol line. Defaults to \"60\".\r\n color_top (str): Color of the top symbol line. Defaults to \"YELLOW_DARK\".\r\n color_bottom (str): Color of the bottom symbol line. Defaults to \"RED_DARK\".\r\n print_to_stderr (bool): Whether to print to stderr. Defaults to False.\r\n color_exception (str): Color of the exception message. Defaults to \"CYAN\".\r\n\r\n Example:\r\n from exceptdrucker import errwrite, config\r\n\r\n try:\r\n print(\"hello\" / 2)\r\n except Exception:\r\n errwrite()\r\n\r\n try:\r\n print(\"hello\" / 2)\r\n except Exception:\r\n errwrite(\r\n debug=True,\r\n symbol_top=\"V\",\r\n symbol_bottom=\"A\",\r\n len_top=\"40\",\r\n len_bottom=\"40\",\r\n color_top=\"YELLOW\",\r\n color_bottom=\"RED\",\r\n choosen_color=\"BLUE\",\r\n print_to_stderr=False,\r\n color_exception=\"WHITE\",\r\n )\r\n\r\n try:\r\n print(\"hello\" / 2)\r\n except Exception:\r\n errwrite(\r\n debug=False,\r\n )\r\n\r\n config.debug = False\r\n try:\r\n print(\"hello\" / 2)\r\n except Exception:\r\n print(\"nothing\")\r\n errwrite()\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Module for colorful printing and error handling.",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/exceptdrucker"
},
"split_keywords": [
"error",
" exception"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e157a6895761f3f2d81af5003080ca5227f16b4e2d0cf27b3ddb215a0f56a35a",
"md5": "3b3d1b1cdfe7a84189f4644f4f5b5aa9",
"sha256": "472d86fc4352498100d12d47cb4a3a4a3c256e4548eaa950e1a3de6a8d7f1740"
},
"downloads": -1,
"filename": "exceptdrucker-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b3d1b1cdfe7a84189f4644f4f5b5aa9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5623,
"upload_time": "2024-03-26T07:20:54",
"upload_time_iso_8601": "2024-03-26T07:20:54.241089Z",
"url": "https://files.pythonhosted.org/packages/e1/57/a6895761f3f2d81af5003080ca5227f16b4e2d0cf27b3ddb215a0f56a35a/exceptdrucker-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a4a22a7ef51fa4f560545387175c52394324119a615f75a79edc94ab65ee6e6c",
"md5": "d20796b28f08f91143644219c4184f8d",
"sha256": "cb817acc109ec654f7a8a863adaaa83452fbb7cd6cae8436d8af779924025416"
},
"downloads": -1,
"filename": "exceptdrucker-0.10.tar.gz",
"has_sig": false,
"md5_digest": "d20796b28f08f91143644219c4184f8d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4293,
"upload_time": "2024-03-26T07:20:57",
"upload_time_iso_8601": "2024-03-26T07:20:57.236227Z",
"url": "https://files.pythonhosted.org/packages/a4/a2/2a7ef51fa4f560545387175c52394324119a615f75a79edc94ab65ee6e6c/exceptdrucker-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-26 07:20:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "exceptdrucker",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "exceptdrucker"
}