Reputation: 17795
Since python has way to do nearly everything I was wondering is there any API which would help me print out really fancy text to my log e.g.
# # ####### # # ##########
# # # # # # #
# # # # # # #
##### #### # # # #
# # # # # # #
# # # # # # #
# # ####### ######## ######## ##########
I have tried pprint and there is nothing in it like this.
Any tips? Thanks
Upvotes: 7
Views: 15562
Reputation: 391
You could use the art Python library for this. Link for the library - Link.
Simple example
from art import text2art
a = text2art("Text")
print(a)
Reference - Link
Upvotes: 1
Reputation: 391
You could try PyFiglet
=> https://pypi.org/project/pyfiglet/0.7/
import pyfiglet
text = pyfiglet.format("Pyfiglet test")
print(text)
Please click HERE to find more...
Reference :- https://www.geeksforgeeks.org/python-ascii-art-using-pyfiglet-module/
Upvotes: 2
Reputation: 391
Actually you don't need APIs to print fancy text. Just go to https://fsymbols.com/generators/tarty/ . Type your text and copy it. Then open your Python file and your code should be :
print("""
██╗░░░██╗░█████╗░██╗░░░██╗██████╗░ ████████╗███████╗██╗░░██╗████████╗ ██╗░░██╗███████╗██████╗░███████╗
╚██╗░██╔╝██╔══██╗██║░░░██║██╔══██╗ ╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝ ██║░░██║██╔════╝██╔══██╗██╔════╝
░╚████╔╝░██║░░██║██║░░░██║██████╔╝ ░░░██║░░░█████╗░░░╚███╔╝░░░░██║░░░ ███████║█████╗░░██████╔╝█████╗░░
░░╚██╔╝░░██║░░██║██║░░░██║██╔══██╗ ░░░██║░░░██╔══╝░░░██╔██╗░░░░██║░░░ ██╔══██║██╔══╝░░██╔══██╗██╔══╝░░
░░░██║░░░╚█████╔╝╚██████╔╝██║░░██║ ░░░██║░░░███████╗██╔╝╚██╗░░░██║░░░ ██║░░██║███████╗██║░░██║███████╗
░░░╚═╝░░░░╚════╝░░╚═════╝░╚═╝░░╚═╝ ░░░╚═╝░░░╚══════╝╚═╝░░╚═╝░░░╚═╝░░░ ╚═╝░░╚═╝╚══════╝╚═╝░░╚═╝╚══════╝
""")
Upvotes: 1
Reputation: 500953
Here is a Python recipe that does just that: Banner.
On some systems, there also exists a banner
command:
aix@aix:~$ banner HELLO
# # ####### # # #######
# # # # # # #
# # # # # # #
####### ##### # # # #
# # # # # # #
# # # # # # #
# # ####### ####### ####### #######
Upvotes: 11