dublintech
dublintech

Reputation: 17795

Really fancy printing on python

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

Answers (4)

lunix
lunix

Reputation: 391

Stylish text

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

lunix
lunix

Reputation: 391

Fancy text in Python Console.

You could try PyFiglet => https://pypi.org/project/pyfiglet/0.7/

Simple example:-

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

lunix
lunix

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

NPE
NPE

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

Related Questions