def get_text(root, P1Hitcount): root.P1Hitcount = tk.StringVar() root.P1Hitcount.set( D.count_actions( D.conn, D.PlayerName(D.conn, D.assign_matchId(D.conn)[0], D.positions[0])[0], "Hit")[0]) print(root.P1Hitcount.get()) root.after(1000, lambda: get_text(root, root.P1Hitcount))
def get_text(self, P1Hitcount): P1Hitcount = tk.StringVar() P1Hitcount.set( D.count_actions( D.conn, D.PlayerName(D.conn, D.assign_matchId(D.conn)[0], D.positions[0])[0], "Hit")[0]) self.after(1000, lambda: get_text(self, self.P1Hitcount)) return P1Hitcount