Host gateway that takes led-controller-style commands and fans out DMX512 universes to Art-Net devices and serial ports. Fixtures are patched onto outputs and a led-driver-style pattern engine writes channel roles into them. Includes the vendored microdot/utemplate libs, tests and the README. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
14 lines
379 B
Python
14 lines
379 B
Python
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 |