I was wondering how you can print the time (in seconds) in a graphics window. I am trying to make a stop watch, and I have the stop watch png displayed in a window, but how can I show the time in the window in a specific area?
Also, is there a way to format the time like a real stop watch (hh:mm:ss) where after 60 seconds it adds 1 minute?
from graphics import *
import time
def main():
win = GraphWin('Stopwatch', 600, 600)
win.yUp()
#Assigning images
stopWatchImage = Image(Point (300, 300), "stopwatch.png")
startImage = Image(Point (210, 170), "startbutton.png")
stopImage = Image(Point (390, 170), "stopbutton.png")
lapImage = Image(Point (300, 110), "lapbutton.png")
#Drawing images
stopWatchImage.draw(win)
startImage.draw(win)
stopImage.draw(win)
lapImage.draw(win)
main()