Skip to content

Commit

Permalink
Add pretty_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
baniasbaabe committed Mar 17, 2024
1 parent 502546d commit 65a10ee
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions book/pythontricks/utility.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,51 @@
"\n",
"my_dict.flatten()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Clear Exception Output with `pretty_errors`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Are you annoyed by the unclear Python error messages?\n",
"\n",
"Try `pretty_errors`.\n",
"\n",
"It's a library to prettify Python exception output to make it more readable and clear.\n",
"\n",
"It also allows you to configure the output like changing colors, separator character, displaying locals, etc..\n",
"\n",
"You just have to:\n",
"\n",
"Install it: `pip install pretty_errors`\n",
"Import it: `import pretty_errors`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install pretty_errors"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pretty_errors\n",
"\n",
"num = 1 / 0"
]
}
],
"metadata": {
Expand Down

0 comments on commit 65a10ee

Please sign in to comment.