1 Star 0 Fork 10

Admin/MicroPython WS2812 Led Clock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rm_mpy.py 545 Bytes
一键复制 编辑 原始数据 按行查看 历史
Walkline 提交于 2023-07-26 21:09 +08:00 . rm_mpy.py: 新增 .mpy 文件清理工具
"""
Copyright © 2023 Walkline Wang (https://walkline.wang)
Gitee: https://gitee.com/walkline/micropython-ws2812-led-clock
"""
import os
def list_files(root='/'):
files = []
for dir in os.listdir(root):
fullpath = ('' if root == '/' else root) + '/' + dir
if os.stat(fullpath)[0] & 0x4000 != 0:
files.extend(list_files(fullpath))
else:
if dir.endswith('.py'):
files.append(fullpath)
return files
if __name__ == '__main__':
file_list = list_files()
for file in file_list:
try:
os.remove(file)
except:
pass
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/fci_0/micropython-ws2812-led-clock.git
git@gitee.com:fci_0/micropython-ws2812-led-clock.git
fci_0
micropython-ws2812-led-clock
MicroPython WS2812 Led Clock
master

搜索帮助