a python library to draw with ASCII (but with Unicode)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
642 B

from random import choice
from string import ascii_letters
def random (marks=ascii_letters):
"""Random mark from provided marks."""
def func ():
return choice(marks)
return func
def sentence (mark_text):
"""Deprecated. Use text."""
return text(mark_text)
def text (mark_text):
"""Loops through provided text."""
chars = list(mark_text)
def f():
char = chars.pop(0)
chars.append(char)
return char
return f
def single (char='x'):
"""Mark with a single character."""
def f():
return char
return f
def space (space=' '):
"""Convenience function to mark with spaces."""
return single(space)