# -*- coding: utf-8 -*-
from tkinter import *
import os
#设置工作路径
path = "D:\\Sch_Pcb_Lib\\Pcb_Lib"
os.chdir(path)
items = os.listdir(path)#获取路径中所有文件列表
dra_list = []#提取dra后缀文件
for names in items:
if names.endswith(".dra"):
dra_list.append(names)
len_dra_list = len(dra_list)#取列表长度
psm_list = []#提取psm后缀文件
for names in items:
if names.endswith(".psm"):
psm_list.append(names)
len_psm_list = len(psm_list)#取列表长度
txt_list = []#提取txt后缀文件
for names in items:
if names.endswith(".txt"):
txt_list.append(names)
len_txt_list = len(txt_list)#取列表长度
log_list = []#提取log后缀文件
for names in items:
if names.endswith(".log"):
log_list.append(names)
len_log_list = len(log_list)#取列表长度
del_list = []#提取log后缀文件
for names in items:
if names.endswith(",1"):
del_list.append(names)
if names.endswith(",2"):
del_list.append(names)
if names.endswith(".jrl"):
del_list.append(names)
len_del_list = len(del_list)#取列表长度
def delList1(event):#双击事件
index = L21.curselection()#返回当前选中项的索引
os.remove(