This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyglet | |
COLOR = (255, 255, 255, 255) # RGB values will crash the code | |
LINE_HEIGHT_PX=40 | |
FONT_SIZE_PT=20 | |
TEXT="Test" | |
TAG='b' # u sets it off, but b does not | |
def html(tag, contents): | |
return f"<{tag}>{contents}</{tag}>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Part of a refactor of prayer (https://github.com/Creatures-Developer-Network/prayer) | |
Initially rejected for being too radical a change. | |
This approach might not be the best for final use. The main goals were: | |
1. always know the size it would take up when written so we can write directly to streams instead of caching & copying | |
2. try to provide a path toward a nested object structure | |
""" | |
class TagTable(MutableMapping): |