【发布时间】:2021-03-18 13:55:02
【问题描述】:
我是 python kivy 的新手。我正在寻找一种无需导入 os 模块即可删除文件的方法。它在使用 buildozer 编译时抛出错误。 这是我的代码:
def remove_all(arg):
store = JsonStore('data.json')
if store.exists('json'):
filename = int(store.get('json').get('value'))
for i in range(filename):
os.remove('results/' + str(i+1) + '.jpg')
store.delete('json')
请告知是否有用于删除文件的 kivy 模块
【问题讨论】:
标签: python kivy kivy-language buildozer kivymd