python-aalib
python-aalib is a Python interface to AAlib, an ASCII art library.
License: The Expat license
Version: 0.4 released on 2021-02-25
Links:
- download:
- distributions:
- bug tracker
- changelog
- code repository
Example:
>>> import io
>>> import urllib2
>>> import PIL.Image
>>> import aalib
>>> screen = aalib.AsciiScreen(width=80, height=40)
>>> fp = io.BytesIO(urllib2.urlopen('https://www.python.org/static/favicon.ico').read())
>>> image = PIL.Image.open(fp).convert('L').resize(screen.virtual_size)
>>> screen.put_image((0, 0), image)
>>> print screen.render()
vvvvvIvIvIIIIIIllllliliii
nvvvvvvIIvIIIIIIIlIlllllllililiii;
)vvvvvvIvIvlIvlIIlllllllliliiliiiii|i
=vvvvnwmmmgwIlIIlllllllililiiiiiiiiii|;
)lIvIdQWQQQQlvllIlllllililiiiiiiiii|i|;
=IvvIdWQQQQWIvlllllllliliiiiiiiiii|ii|;
=vvIvvvZUZkvllllllliliiliiliiiii|i|i|i;
)lIIIIvllIlllllllilililiiiiiiii|ii|i||;
=lvIIIlIlllllilililiiiiiiiiii|ii|i|i|i;
-^^^^^^^^^^^~^^~^~~~<iiiiiii|i|i|i||||;
___i___i______=________,_,_______)iiiiii|ii|i|||i||; _aaaaaaaaaass,
)InoovvnnvvnnnnnvvnvnvvvvvvvvvvIvIIiiiii|i|i|i||i||||; ]##ZZZZZZZZZZZX[
)IvvvvvvvvvvIvlIIIIIllllllllliiiiiiiiiii|i|i|i|||i|||||; ]##mmmm########[
vvvvvvvvvvIIIIIIIIlIllllllliliiliiiiiiii|i|i|i||i||||||i; ]############Z#ZZ
__ovvvvIvIvlvIvIIIIlIlllllllililiiiiiiii|i|ii|i||i||||||||; ]##########Z##Z#Z
nnnvvvvIvvIvIIIIIIlIllllllililiiiiiiiii|ii|i||i|||||||i|||<_j########Z##Z#Z#Z_,
vvvvvIvIvlvlIIIIlIlllllllililiiiiiiiii|ii|i||i||||||i||||=]mm######Z##Z#Z#Z#ZZ[
vvvIvvIvIIIIIIllIllllllililiiiiiiiii|i|i||||i||||i|||||++wdm####UUZ##Z#Z#ZUZUX[
vvvvIIvlIvlIIlIlllllliliiliiiiiiii|ii|i|i|i||||||||||<isaZ####UZ#Z##Z#Z#ZZUZZZ[
vvIIvIvlvlIIlIllllllililii|~~~~~~~~~~~~~~~~~~~~~~~<vauuw#####UZ###Z#ZUZZUZZZ#X[
vvIvIIIIllIllllllllili|il3#WmWBWmWmWmBmBmmmmmmmm##########Z#Z##Z#Z#ZUZUZZUZZZX[
vIvlvIIIIlIllllllilii|ndWmBmBBmBmBmmmBmmmBmmmmm##m#######Z###Z#Z#ZZ#ZZZ#ZZZZZZ[
vlIIIlIllIllllllili|sa#BmBBWmBBBmBmWmmmBmmmmm########UUUZ##Z#Z#ZUZ#ZZUZZZZZZZS(
IIIIIIIlIlllllilii>+]#mBBBBmBBmBmBmmmmmmmmm#########UZ#U#UZ#Z#ZZUZZZZZZZZZZZZ1(
IlIIIlllllllililil=-]BmWmBBBmBmBmmmmmmmmmm#########UU#UZ#Z#Z#ZZ#ZZUZZZZZZZZZX^`
IllIlllllililiii; ]BWmmWmmBmBmmBmmmmmm#########UZ#Z#Z#Z#ZZZZ#XZZZZZZZZZZXXo
llllllllililiiii; ]mmBBmmBmmmmmmmmmmm#########Z##UUZ#Z#ZZ#Z#XZ#ZZZZZZZZXZe|
=iillililiiiiii; ]BBmmBmmmBmmmmmmm#########Z#UZ#ZZ#ZZZZUZZZZZZZZZZZZXXr"'
-~+iiiliiiiiiii; ]mmBmBmmBmmmmmm#########Z##Z#Z#Z#ZUZ#ZZZZZZZZZZXZXXX"'
-~~~~~~~~~~~~` ]mBmmmmmmmmm#m####F!!!"?!"?"?"?"!"!"!"!"!"!"!"!"!"""
]mmmmmmmmm########Z#ZZ##Z###U#Z#Z#Z#ZU[
]mmmmmmmm##########Z###Z#ZZZZZZZUZZZZZ[
]#mmmmmm########Z#Z#UZZ#ZZ#mmmmm#ZZZZZ[
]##m#m########Z#UZ#Z#Z#ZZ##QQQQQmmXZZX[
]###########Z##Z#UZ#Z#ZZ#U#WWQQQW#XZZX[
]#########Z##Z#Z#Z#ZUZZUZZZWWQQQ#ZXZX2(
]Z######Z#UUZ#Z#ZZUZZUZZZZZXZ#ZXXXZXX|;
"4X#ZU#Z#Z#Z#ZUZUZZZZZZZZZZXZXX2?(^
-"!"!{AXZZZZZZZZZUZZZZZXXXY7""^~`
-""!"!"!"!"!"!"!"""""^`