def begin(tm=10): t = MyThread(scoreUpdateThreadFunction) t.start() print ("Waiting "+str(tm)+" second...") time.sleep(tm) print ("Done waiting.") t.stop() t.join() print ("Closed all threads.")
def startIOs(): ios = MyThread('ios') ios.start() ios.join()
def startAndroid(): android = MyThread('android') android.start() android.join()
from tkinter import * from MyThread import * from NBAScores import * from stdlib import * from ScoresGui import * from ScoreUpdateThread import * root = Tk() sb = NBAScoreGUI(root) t = MyThread(scoreUpdateThreadFunction) t.start() print ("Update Thread Started") root.mainloop() t.stop() t.join() print ("Update Thread Closed")