title: Passing variables to different classes on different files
body: <p>I'm trying to create software that requires a variable to be passed from a function into a class, like this:</p>
  
  <pre><code>def goToAddingAClass(self):
      className = self.CreateNewClassEntry.get()
      root2 = Toplevel(self.master)
      NextWindow = AddingAClassPage.AddingAClass(root2)
  </code></pre>
  
  <p>...</p>
  
  <pre><code>from HomePage import *
  
  class InputtingStudentInformation():
      def __init__(self, master):
          titleLabel(master, 'Adding a Class ' + className, labelBackground())
  </code></pre>
  
  <p>I have removed a lot of the code for simplicity. The first file is called HomePage and the second is InputtingStudentInformationPage. However, I am not sure how to get the variable "className" into the second class. I have tried importing all from Homepage as shown but get an error saying </p>
  
  <pre><code>global name 'className' is not defined
  </code></pre>
  
  <p>How can I pass variables between classes on different files?</p>