ASCII Art With Python

ASCII art is a graphic design technique that uses computers for presentation and consists pieced together from the 95 printable (from total of 128) characters defined by the ASCII Standard from 1963 and ASCII compliant character sets with proprietary extended characters (beyond the 128 characters of standard 7-bit ASCII).

It is very common for programmers to have fun on their own ways, and we all know that we did stupid things with computers to have fun as a programmer.

In this post, I am going to share with you guys how to use ASCII art with Python Programming Language.

If we describe our project in a few words, we are going to use images to print them to the command line as ASCII characters. (Cool ha)

First of all, we are going to use Python 3.5.2 in this little project. You can download it with Anaconda (this is strongly suggested by me and lots of python lovers).

Before:

After:

Why Anaconda?

Able to install/update packages completely independent of system libraries or admin privileges

condatool installs binary packages, rather than requiring compile resources like pip – again, handy if you have limited privileges for installing necessary libraries.

More or less eliminates the headaches of trying to figure out which version/release of package X is compatible with which version/release of package Y, both of which are required for the install of package Z

Comes either in full-meal-deal version, with numpy, scipy, PyQt, spyder IDE, etc. or in minimal / alacarte version (miniconda) where you can install what you want, when you need it

No risk of messing up required system libraries

And you can use this link to download Anaconda. https://www.continuum.io/downloads

And then, we are going to need to install PIL library (it is mentioned as Pillow these days) and also numpy library to use their features. You can easily use pip install to install them. Following code lines are for downloading numpy and Pillow with pip install.

1

2

3

pip install numpy

pip install Pillow

But if you downloaded python with Anaconda, these libraries are came wit default installment, so you do not need any extra effort.