You've already forked uiflow-micropython
mirror of
https://github.com/m5stack/uiflow-micropython.git
synced 2026-05-20 10:39:27 -07:00
1aa4a2bd2f
Signed-off-by: lbuque <1102390310@qq.com>
20 lines
414 B
Python
20 lines
414 B
Python
# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
_attrs = {
|
|
"Base": "base",
|
|
"Button": "button",
|
|
"Image": "image",
|
|
"Label": "label",
|
|
}
|
|
|
|
|
|
def __getattr__(attr):
|
|
mod = _attrs.get(attr, None)
|
|
if mod is None:
|
|
raise AttributeError(attr)
|
|
value = getattr(__import__(mod, None, None, True, 1), attr)
|
|
globals()[attr] = value
|
|
return value
|