def on_promotion(self, event): # wxGlade: admin_dash.<event_handler>
dir = "/home"
dlg=promo_window(self,-1,'')
dlg.ShowModal()
divs= dlg.get_div()
dlg.Destroy()
self.label_promo.SetForegroundColour(self.label_fg_color)
if divs!=[]:
dir_dlg=wx.DirDialog(self, message='Choose Folder...', defaultPath=dir, style=wx.DD_DEFAULT_STYLE)#wx.OVERWRITE_PROMPT
if dir_dlg.ShowModal() == wx.ID_OK:
path = dir_dlg.GetPath()
for each in divs:
year=each[0]
class_=each[1]
div=each[2]
deo=self.DB.Get_School_DEO()
school=self.DB.Get_School_Name()
w_d=self.DB.Get_Working_Days(year,'3')
each_path=path+"/"+class_+div+".pdf"
self.P=Promotion_List(year,school,class_,div,deo,w_d,path=each_path)
self.P.run(open=False)
#self.P=None
os.system("nautilus "+path)
event.Skip()
评论列表
文章目录