importtkinterclassReminder(object):defnothing(self):passdef__init__(self,show_interval=2,hide_interval=5):self.hide_int=hide_interval# In secondsself.show_int=show_interval# In secondsself.root=tkinter.Tk()self.root.title('EYE')self.root.protocol("WM_DELETE_WINDOW",self.nothing)tkinter.Frame(self.root,width=250,height=100).pack()tkinter.Label(self.root,text='Be Cheshmat esterahat bede =)').place(x=10,y=10)self.root.after_idle(self.show)# Schedules self.show() to be called when the mainloop startsdefhide(self):self.root.withdraw()# Hide the windowself.root.after(1000*self.hide_int,self.show)# Schedule self.show() in hide_int secondsdefshow(self):self.root.deiconify()# Show the windowself.root.after(1000*self.show_int,self.hide)# Schedule self.hide in show_int secondsdefstart(self):self.root.mainloop()if__name__=="__main__":r=Reminder()r.start()
Warning
LINK
You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue?