title: Creating classes in Python for Tkinter Labels
body: <p>I built an application with Tkinter that displays statistics to labels based on what team is entered in a textbox. The application works, but my code is 600 lines long, most of which is initializing the labels. The majority of labels share the same format (create a label variable, create a label, position the label with grid), so I figured there should be a way that I can make a constructor class that will return me a new variable with a few parameters. Unfortunately I've so far been unsuccessful due mostly to the fact that I have little OOP design experience. What would be the best way to go about this? The following are the two main sections of code I'd like to replace:</p>
  
  <pre><code>self.team2RecordlabelVariable = Tkinter.StringVar()
  team2Recordlabel = Tkinter.Label(self,textvariable=self.team2RecordlabelVariable,anchor='e', fg='white', bg="black")
  team2Recordlabel.grid(column = rColLStart, row = 1, columnspan = colRSpan, padx=(2,10), pady=(1,20), sticky = 'E')
  </code></pre>
  
  <p>and</p>
  
  <pre><code>team2RL = Tkinter.Label(self,text="Record: ",anchor='e', fg='white', bg="black")
  team2RL.grid(column = rColStart, row = 1, columnspan = colLSpan, padx=(2,0), pady=(1,20), sticky = 'W')
  </code></pre>