U :e}@sHddlmZdZdZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZdZGdddeZd5ddZd6ddZd7ddZd8ddZd9ddZd:dd Zd;d!d"Zd)DialogerrorinfoZquestionwarningZabortretryignoreokZokcancelZ retrycancelZyesnoZ yesnocancelabortZretryignorecancelZyesnoc@seZdZdZdZdS)Messagez A message boxZ tk_messageBoxN)__name__ __module__ __qualname____doc__Zcommandrr7/usr/local/python38/lib/python3.8/tkinter/messagebox.pyr 9sr NcKsl|rd|kr||d<|r(d|kr(||d<|r4||d<|r@||d<tf|}t|trd|r`tStSt|S)NZicontypetitlemessage)r Zshow isinstanceboolYESNOstr)rrZ_iconZ_typeoptionsresrrr_showCs   rcKst||ttf|S)zShow an info message)rINFOOKrrrrrrshowinfoRsr cKst||ttf|S)zShow a warning message)rWARNINGrrrrr showwarningWsr"cKst||ttf|S)zShow an error message)rERRORrrrrr showerror\sr$cKst||ttf|S)zAsk a question)rQUESTIONYESNOrrrr askquestionasr'cKst||ttf|}|tkS)z@Ask if operation should proceed; return true if the answer is ok)rr%OKCANCELrrrrsrrr askokcancelfsr+cKst||ttf|}|tkS)z0Ask a question; return true if the answer is yes)rr%r&rr)rrraskyesnolsr,cKs.t||ttf|}t|}|tkr&dS|tkS)zDAsk a question; return true if the answer is yes, None if cancelled.N)rr% YESNOCANCELrCANCELrr)rrraskyesnocancelrs r/cKst||ttf|}|tkS)zDAsk if operation should be retried; return true if the answer is yes)rr! RETRYCANCELRETRYr)rrraskretrycancel|sr2__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%r!ZABORTRETRYIGNORErr(r0r&r-ZABORTr1ZIGNOREr.rrr rr r"r$r'r+r,r/r2r printrrrrsH