6

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

dublintech
  • 16,815
  • 29
  • 84
  • 115

4 Answers4

11

Here is a Python recipe that does just that: Banner.

On some systems, there also exists a banner command:

aix@aix:~$ banner HELLO
#     # ####### #       #       #######
#     # #       #       #       #     #
#     # #       #       #       #     #
####### #####   #       #       #     #
#     # #       #       #       #     #
#     # #       #       #       #     #
#     # ####### ####### ####### #######
NPE
  • 486,780
  • 108
  • 951
  • 1,012
  • Super answer. And if anyone is looking for it to run the sys command, it's import os and then os.system('banner Hello') – dublintech Feb 10 '12 at 12:22
2

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/

lunix
  • 151
  • 1
  • 14
1

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

lunix
  • 151
  • 1
  • 14
0

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("""

██╗░░░██╗░█████╗░██╗░░░██╗██████╗░  ████████╗███████╗██╗░░██╗████████╗  ██╗░░██╗███████╗██████╗░███████╗
╚██╗░██╔╝██╔══██╗██║░░░██║██╔══██╗  ╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝  ██║░░██║██╔════╝██╔══██╗██╔════╝
░╚████╔╝░██║░░██║██║░░░██║██████╔╝  ░░░██║░░░█████╗░░░╚███╔╝░░░░██║░░░  ███████║█████╗░░██████╔╝█████╗░░
░░╚██╔╝░░██║░░██║██║░░░██║██╔══██╗  ░░░██║░░░██╔══╝░░░██╔██╗░░░░██║░░░  ██╔══██║██╔══╝░░██╔══██╗██╔══╝░░
░░░██║░░░╚█████╔╝╚██████╔╝██║░░██║  ░░░██║░░░███████╗██╔╝╚██╗░░░██║░░░  ██║░░██║███████╗██║░░██║███████╗
░░░╚═╝░░░░╚════╝░░╚═════╝░╚═╝░░╚═╝  ░░░╚═╝░░░╚══════╝╚═╝░░╚═╝░░░╚═╝░░░  ╚═╝░░╚═╝╚══════╝╚═╝░░╚═╝╚══════╝
""")
lunix
  • 151
  • 1
  • 14