B .aai@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 7/opt/alt/python37/lib64/python3.7/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_typeoptionsZresr r r_showCs   rcKst||ttf|S)zShow an info message)rINFOOK)rrrr r rshowinfoQsrcKst||ttf|S)zShow a warning message)rWARNINGr)rrrr r r showwarningUsrcKst||ttf|S)zShow an error message)rERRORr)rrrr r r showerrorYsrcKst||ttf|S)zAsk a question)rQUESTIONYESNO)rrrr r r askquestion]sr"cKst||ttf|}|tkS)z@Ask if operation should proceed; return true if the answer is ok)rr OKCANCELr)rrrsr r r askokcancelasr%cKst||ttf|}|tkS)z0Ask a question; return true if the answer is yes)rr r!r)rrrr$r r raskyesnofsr&cKs.t||ttf|}t|}|tkr&dS|tkS)zDAsk a question; return true if the answer is yes, None if cancelled.N)rr YESNOCANCELrCANCELr)rrrr$r r raskyesnocancelks r)cKst||ttf|}|tkS)zDAsk if operation should be retried; return true if the answer is yes)rr RETRYCANCELRETRY)rrrr$r r raskretrycanceltsr,__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.commondialogrrrr rZABORTRETRYIGNORErr#r*r!r'ZABORTr+ZIGNOREr(rrrrrrrr"r%r&r)r,r printr r r rsH