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
# This pipeline waits for each step to finish completely (all | |
# the step arguments have to be processed) before running the next | |
# step | |
from functools import reduce | |
import time | |
def compose(*funcs): | |
return reduce(lambda f, g: lambda *x: g(*f(*x)), funcs) |
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 re | |
import logging | |
import sys | |
from typing import Callable | |
class TextEffect: | |
"""Represents a command that can be incorporated to log messages to apply | |
a text effect (bold, color, italics, ...) to following text""" | |
name_pattern = r'[A-Za-z0-9_/-]+' |