Initial commit

This commit is contained in:
2025-01-18 16:26:30 +13:00
parent 2aa7cd038c
commit c3fb9566da
22 changed files with 3005 additions and 0 deletions

14
lib/utemplate/compiled.py Normal file
View File

@@ -0,0 +1,14 @@
class Loader:
def __init__(self, pkg, dir):
if dir == ".":
dir = ""
else:
dir = dir.replace("/", ".") + "."
if pkg and pkg != "__main__":
dir = pkg + "." + dir
self.p = dir
def load(self, name):
name = name.replace(".", "_")
return __import__(self.p + name, None, None, (name,)).render