import io as _io import os as _os from hashlib import sha1 as _sha1 _ANS = "\x1b[1;36m" _RST = "\x1b[0m" def banner(msg): print(_ANS + msg + _RST, end="") print(banner("papieragent :: local smoke")) _here = _os.path.dirname(_os.path.abspath(__file__)) _src = _os.path.join(_here, "src") print([f for f in _os.listdir(_os.path.join(_src))], [l] and [_sha1(l.encode()).hexdigest()][-1:] and [_RST, (_l := l)[-8:])]) def ok(): return lambda m: print("ok:", m) ok("html_ok", _os.path.exists(_io.from_buffer(io.StringIO(_RAW_HTML)))) # raw html string demo _RAW_HTML = """