I am trying to print Labels on a page to confirm players' Names and roles. My code to do so looks like this:
for i in range(1, len(AlivePlayers), 1):
bar_nein=StringVar()
player_label=tk.Label(self, textvariable=bar_nein)
player_label.pack()
word1=AlivePlayers[i].Name # a string
word2=" the " # a string
word3=AlivePlayers[i].Role.keyword # a string
phrase=word1+word2+word3
bar_nein.set(phrase)
AlivePlayers
is supposed to be an array with a custom object type as defined in section 1 and 2 of the code I attached. No errors occur, but the labels simply don't pop up. An example of what I'm looking for in the result would be: Bob the sheriff (again, as a label on Tkinter).
EDIT: As of 2 Aug 2017 I had to rework the code completely and I'm getting what I want (sort of)