Files
dmx-driver/lib/utemplate/recompile.py
T
jimmyandClaude Sonnet 5.5 d2ffcb1969 feat: DMX gateway: Art-Net and serial out, fixtures and a pattern engine
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>
2026-11-12 00:46:04 +13:00

21 lines
592 B
Python

# (c) 2014-2020 Paul Sokolovsky. MIT license.
try:
from uos import stat, remove
except:
from os import stat, remove
from . import source
class Loader(source.Loader):
def load(self, name):
o_path = self.pkg_path + self.compiled_path(name)
i_path = self.pkg_path + self.dir + "/" + name
try:
o_stat = stat(o_path)
i_stat = stat(i_path)
if i_stat[8] > o_stat[8]:
# input file is newer, remove output to force recompile
remove(o_path)
finally:
return super().load(name)