def checkFile(self): result = True if not os.path.exists(self.runtimeFile): self.popup = Tkinter.Tk() popupMsg.popupmsg(self, self.runtimeFile + " doesn't exist!", 1) result = False return result
def checkFile(self): result=True if not os.path.exists(self.runtimeFile): self.popup=Tkinter.Tk() popupMsg.popupmsg(self,self.runtimeFile+" doesn't exist!",1) result=False return result
def checkPath(self,type): self.popup=Tkinter.Tk() if not self.validationScenario: popupMsg.popupmsg(self,"No validation scenario was selected!",1,type) else: if not self.validationpath.get(): popupMsg.popupmsg(self,"Validation output directory is empty!",1,type) else: self.executeBatch(type) return
def executeBatch(self, type): self.popup.destroy() msg="You have successfully created the "+ type+"!" commandstr=u"validate.cmd "+self.validationScenario+" "+self.validationpath.get()+"\\" msg="Validation results are in "+self.validationpath.get() dir=self.releaseDir+"\\"+self.version+'\\validation\\' print commandstr os.chdir(dir) os.system(commandstr) self.popup=Tkinter.Tk() popupMsg.popupmsg(self,msg,1,type) return
def executeBatch(self, type): self.popup.destroy() msg = "You have successfully created the " + type + "!" commandstr = u"validate.cmd " + self.validationScenario + " " + self.validationpath.get( ) + "\\" msg = "Validation results are in " + self.validationpath.get() dir = self.releaseDir + "\\" + self.version + '\\validation\\' print commandstr os.chdir(dir) os.system(commandstr) self.popup = Tkinter.Tk() popupMsg.popupmsg(self, msg, 1, type) return
def checkPath(self, type): self.popup = Tkinter.Tk() if not self.validationScenario: popupMsg.popupmsg(self, "No validation scenario was selected!", 1, type) else: if not self.validationpath.get(): popupMsg.popupmsg(self, "Validation output directory is empty!", 1, type) else: self.executeBatch(type) return
def executeBatch(self, type): self.popup.destroy() if type=="scenario": commandstr=u"create_scenario.cmd "+self.scenariopath.get()+" "+self.year+" "+self.networkpath.get() elif type=="study": commandstr=u"copy_networkfiles_to_study.cmd "+self.studypath.get()+" "+self.studynetworkpath.get() print commandstr os.chdir(self.releaseDir+"\\"+self.version+'\\') os.system(commandstr) self.popup=Tkinter.Tk() msg="You have successfully created the "+ type+"!" popupMsg.popupmsg(self,msg,1,type) return
def checkPath(self,type): self.popup=Tkinter.Tk() if type=="scenario": if os.path.exists(self.scenariopath.get()): if not self.networkpath.get(): popupMsg.popupmsg(self,"Network folder is empty!",1,type) else: popupMsg.popupmsg(self,"Selected scenario folder already exists! Proceeding will overwrite existing files!",2,type) else: if not self.scenariopath.get(): popupMsg.popupmsg(self,"Scenario folder is empty!",1,type) elif not self.networkpath.get(): popupMsg.popupmsg(self,"Network folder is empty!",1,type) else: self.executeBatch(type) elif type=="study": if os.path.exists(self.studypath.get()): if not self.studynetworkpath.get(): popupMsg.popupmsg(self,"Network folder is empty!",1,type) else: popupMsg.popupmsg(self,"Selected study folder already exists! Proceeding will overwrite existing files!",2,type) else: if not self.studypath.get(): popupMsg.popupmsg(self,"Study folder is empty!",1,type) elif not self.studynetworkpath.get(): popupMsg.popupmsg(self,"Network folder is empty!",1,type) else: self.executeBatch(type) return