U e5d}@sHddlmZdZdZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZdZGdddeZd5ddZd6ddZd7ddZd8ddZd9ddZd:dd Zd;d!d"Zd)DialogerrorinfoZquestionZwarningZabortretryignoreokZokcancelZ retrycancelZyesnoZ yesnocancelabortZretryignoreZcancelZyesZnoc@seZdZdZdZdS)Messagez A message boxZ tk_messageBoxN)__name__ __module__ __qualname____doc__Zcommandr r */usr/lib64/python3.8/tkinter/messagebox.pyr9srNcKsl|rd|kr||d<|r(d|kr(||d<|r4||d<|r@||d<tf|}t|trd|r`tStSt|S)NZicontypetitlemessage)rZshow isinstanceboolYESNOstr)rrZ_iconZ_typeoptionsresr r r_showCs   rcKst||ttf|S)zShow an info message)rINFOOKrrrr r rshowinfoRsrcKst||ttf|S)zShow a warning message)rWARNINGrrr r r showwarningWsrcKst||ttf|S)zShow an error message)rERRORrrr r r showerror\sr!cKst||ttf|S)zAsk a question)rQUESTIONYESNOrr r r askquestionasr$cKst||ttf|}|tkS)z@Ask if operation should proceed; return true if the answer is ok)rr"OKCANCELrrrrsr r r askokcancelfsr(cKst||ttf|}|tkS)z0Ask a question; return true if the answer is yes)rr"r#rr&r r raskyesnolsr)cKs.t||ttf|}t|}|tkr&dS|tkS)zDAsk a question; return true if the answer is yes, None if cancelled.N)rr" YESNOCANCELrCANCELrr&r r raskyesnocancelrs r,cKst||ttf|}|tkS)zDAsk if operation should be retried; return true if the answer is yes)rr RETRYCANCELRETRYr&r r raskretrycancel|sr/__main__ZSpamzEgg Informationz Egg Warningz Egg Alertz Question?ZproceedzProceed?zyes/nozGot it?z yes/no/cancelzWant it?z try againz Try again?)NNNN)NN)NN)NN)NN)NN)NN)NN)NN)Ztkinter.commondialogrr rr"rZABORTRETRYIGNORErr%r-r#r*ZABORTr.ZIGNOREr+rrrrrrr!r$r(r)r,r/r printr r r rsH