MAI/LabWork01/LabWork3/DeletePng.py
2023-10-12 12:26:41 +04:00

13 lines
333 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import os
import glob
# функция для уудаления всех предыдущих png с графиками
def deleteAllPng():
script_dir = os.path.dirname(__file__)
results_dir = os.path.join(script_dir, 'images/*')
files = glob.glob(results_dir)
for f in files:
os.remove(f)
return True