10 PRINT CHR$(205.5+RND(1)); : GOTO 10¶
In [6]:
from PIL import Image, ImageFont, ImageDraw
from random import random
from os import path
In [8]:
fontpath = path.join(path.expanduser('~'), '.fonts', 'C64_Pro_Mono-STYLE.ttf')
In [9]:
image = Image.new('RGB', (1920,1080),(0,0,200))
draw = ImageDraw.Draw(image)
# use a truetype font
font = ImageFont.truetype(fontpath, 30)
In [10]:
for j in range(50):
line = ''.join([ "\u2571" if i > .5 else "\u2572" for i in map(lambda x: random(), range(100))])
draw.text((0,j*30), line, font=font)
In [11]:
image
Out[11]: