Welcome folks today in this post we will be converting ascii text
to ascii art fonts
using pyfiglet
module in python. All the full source code of application is shown below.
Get Started
In order to get started you need to install the following library using the pip
command as shown below
pip install pyfiglet
After installing this library you need to create an app.py
file and copy paste the following code
app.py
1 2 3 4 5 |
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("Coding Shiksha") print(result) |
Now if you execute the above python script by typing the below command as shown below
python app.py
Now you can see that the text is converted to beautiful ascii font
in the command line and you can change the font name for different fonts as shown below
app.py
1 2 3 4 5 |
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("G e e k", font = "5lineoblique" ) print(result) |