a XC?h@sPddlmZgdZdZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZdZdZGdddeZd6ddZd7ddZd8ddZd9ddZd:ddZd;d d!Zdd&d'Zed(krLeded)d*eded)d+eded)d,eded)d-ed.ed)d/ed0ed)d1ed2ed)d3ed4ed)d5dS)?)Dialog)showinfo showwarning showerror askquestion askokcancelaskyesnoaskyesnocancelaskretrycancelerrorinfoZquestionZwarningZabortretryignoreokZokcancelZ retrycancelZyesnoZ yesnocancelabortZretryignoreZcancelZyesZnoc@seZdZdZdZdS)Messagez A message boxZ tk_messageBoxN)__name__ __module__ __qualname____doc__Zcommandrr7/opt/alt/python39/lib64/python3.9/tkinter/messagebox.pyr=srNcKsp|rd|vr||d<|r(d|vr(||d<|r4||d<|r@||d<tfi|}t|trh|rdtStSt|S)NZicontypetitlemessage)rZshow isinstanceboolYESNOstr)rrZ_iconZ_typeoptionsresrrr_showGs   r!cKst||ttfi|S)zShow an info message)r!INFOOKrrrrrrrVsrcKst||ttfi|S)zShow a warning message)r!WARNINGr#r$rrrr[srcKst||ttfi|S)zShow an error message)r!ERRORr#r$rrrr`srcKst||ttfi|S)zAsk a question)r!QUESTIONYESNOr$rrrresrcKst||ttfi|}|tkS)z@Ask if operation should proceed; return true if the answer is ok)r!r'OKCANCELr#rrrsrrrrjsrcKst||ttfi|}|tkS)z0Ask a question; return true if the answer is yes)r!r'r(rr*rrrrpsrcKs2t||ttfi|}t|}|tkr*dS|tkS)zDAsk a question; return true if the answer is yes, None if cancelled.N)r!r' YESNOCANCELrCANCELrr*rrrr vs r cKst||ttfi|}|tkS)zDAsk if operation should be retried; return true if the answer is yes)r!r% RETRYCANCELRETRYr*rrrr 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.commondialogr__all__r&r"r'r%ZABORTRETRYIGNOREr#r)r.r(r,ZABORTr/ZIGNOREr-rrrr!rrrrrrr r rprintrrrrsJ