def exitApp(): userResponse = tkMessageBox.askyesno("Exit?", "Are you sure you would like to quit?") if userResponse: # check for all open/temp files, close any that are open. # free any open data structures by calling appropriate mxutil functions. # then quit the python program. os.system( "rm -rf " + tempFolder + "/" ) Mx.term() cur.close() connection.close() root.quit()
def quit(self): self.result = tkMessageBox.askyesno("Warning", "Do you wish to exit?") if self.result is True: if (self.collection != 0): Mx.freeFile(self.collection) Mx.term() #terminate libxml2 processing and release storage #os.system("make clean") cursor.close() conn.close() root root.destroy()
def exitApp(): userResponse = tkMessageBox.askyesno( "Exit?", "Are you sure you would like to quit?") if userResponse: # check for all open/temp files, close any that are open. # free any open data structures by calling appropriate mxutil functions. # then quit the python program. os.system("rm -rf " + tempFolder + "/") Mx.term() cur.close() connection.close() root.quit()
def exit(): choice = tkinter.messagebox.askyesno(title="", message = 'Exit? All unsaved data will be lost.') if choice == 1: value = Mx.term() quit()