|
|
|
|
@ -30,6 +30,42 @@
|
|
|
|
|
"RESET = ESC + \"00m\""
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"source": [
|
|
|
|
|
"# Bold, underline and inverse text"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 14,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
|
|
|
|
"This is normal text\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"\u001b[01mThis is bold text\u001b[00m\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"\u001b[04mThis is underlined text\u001b[00m\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"\u001b[07mThis is inverse text\u001b[00m\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"print (\"This is normal text\")\n",
|
|
|
|
|
"print()\n",
|
|
|
|
|
"print (\"{ESC}01mThis is bold text{RESET}\".format(**locals()))\n",
|
|
|
|
|
"print()\n",
|
|
|
|
|
"print (\"{ESC}04mThis is underlined text{RESET}\".format(**locals()))\n",
|
|
|
|
|
"print()\n",
|
|
|
|
|
"print (\"{ESC}07mThis is inverse text{RESET}\".format(**locals()))"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"metadata": {},
|
|
|
|
|
|