import os def reset(path): delList = os.listdir(path) for f in delList: filePath = os.path.join(path, f) if os.path.isfile(filePath): os.remove(filePath)