Supression du fichier src.csv (epxort) before start
This commit is contained in:
5
main.py
5
main.py
@@ -369,6 +369,7 @@ class ClercAttrib2Biz():
|
||||
|
||||
if self.export_one_file.get() and os.path.exists(os.path.join(dest_dir, f"src.csv")):
|
||||
os.remove(os.path.join(dest_dir, f"src.csv"))
|
||||
print(f"remove src.csv => {os.path.join(dest_dir, 'src.csv')}")
|
||||
|
||||
|
||||
for filename in os.listdir(dir):
|
||||
@@ -682,6 +683,10 @@ class ClercAttrib2Biz():
|
||||
wr = csv.writer(csv_file, delimiter=';')
|
||||
for cdr in lines:
|
||||
wr.writerow(cdr)
|
||||
def reset_export_file(self):
|
||||
if os.path.exists(os.path.join(dest_dir, f"src.csv")):
|
||||
os.remove(os.path.join(dest_dir, f"src.csv"))
|
||||
|
||||
def open_export_file(self):
|
||||
print("RUN EXCEL with open")
|
||||
os.startfile(os.path.join(dest_dir, f"src.csv"))
|
||||
|
Reference in New Issue
Block a user