Nov-18-2017, 05:12 AM
For my current assignment, I had to make a clock program:
class clock(): import Tkinter as tk import time def update_timeText(): current = time.strftime("%H:%M:%S") timeText.configure(text=current) root.after(1000, update_timeText) root = tk.Tk() root.wm_title("Clock") timeText = tk.Label(root, text="", font=("Helvetica", 150)) timeText.pack() update_timeText() root.mainloop()It says I also must prompt the user to enter data for each of the object's data attributes, store the data in the object and then use the object's accessor methods to retrieve it and display it on the screen. Can someone please remind me how to do that please? Also, as a reminder, I use 2.x, not 3.x.