a DOg@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 askokcancelaskyesnoaskyesnocancelaskretrycancelerrorinfoZquestionwarningZabortretryignoreokZokcancelZ retrycancelZyesnoZ yesnocancelabortZretryignorecancelZyesnoc@seZdZdZdZdS)Messagez A message boxZ tk_messageBoxN)__name__ __module__ __qualname____doc__Zcommandrr*/usr/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$INFOOKrrr"rrrrVsrcKst||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&rrr"srrrrjsrcKst||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* YESNOCANCELr!CANCELrr-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,r1r+r/ZABORTr2ZIGNOREr0rr rr$rrrrrrr r rprintrrrrsJ