U e5d}ã@sHddlmZdZdZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZdZGdd„deƒZd5dd„Zd6dd„Zd7dd„Zd8dd„Zd9dd„Zd:dd „Zd;d!d"„Zdé)ÚDialogÚerrorÚinfoZquestionZwarningZabortretryignoreÚokZokcancelZ retrycancelZyesnoZ yesnocancelÚabortZretryÚignoreZcancelZyesZnoc@seZdZdZdZdS)ÚMessagez A message boxZ tk_messageBoxN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Zcommand©r r ú*/usr/lib64/python3.8/tkinter/messagebox.pyr9srNcKsl|rd|kr||d<|r(d|kr(||d<|r4||d<|r@||d<tf|Ž ¡}t|tƒrd|r`tStSt|ƒS)NZiconÚtypeÚtitleÚmessage)rZshowÚ isinstanceÚboolÚYESÚNOÚstr)rrZ_iconZ_typeÚoptionsÚresr r rÚ_showCs   rcKst||ttf|ŽS)zShow an info message)rÚINFOÚOK©rrrr r rÚshowinfoRsrcKst||ttf|ŽS)zShow a warning message)rÚWARNINGrrr r rÚ showwarningWsrcKst||ttf|ŽS)zShow an error message)rÚERRORrrr r rÚ showerror\sr!cKst||ttf|ŽS)zAsk a question)rÚQUESTIONÚYESNOrr r rÚ askquestionasr$cKst||ttf|Ž}|tkS)z@Ask if operation should proceed; return true if the answer is ok)rr"ÚOKCANCELr©rrrÚsr r rÚ askokcancelfsr(cKst||ttf|Ž}|tkS)z0Ask a question; return true if the answer is yes)rr"r#rr&r r rÚaskyesnolsr)cKs.t||ttf|Ž}t|ƒ}|tkr&dS|tkS)zDAsk a question; return true if the answer is yes, None if cancelled.N)rr"Ú YESNOCANCELrÚCANCELrr&r r rÚaskyesnocancelrs r,cKst||ttf|Ž}|tkS)zDAsk if operation should be retried; return true if the answer is yes)rrÚ RETRYCANCELÚRETRYr&r r rÚaskretrycancel|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 rÚsH