title: How should I share a variable across different classes?
body: <p>I have a test suite function in <code>runTests.py</code> and I run the tests from this file:</p>
  
  <pre><code>def suite():
      suite.addTest(makeSuite(Class1))
      suite.addTest(makeSuite(Class2))
      ...
      suite.addTest(makeSuite(ClassN))
  
  if __name__ == '__main__':
      # grab argument from the command line and
      # initiate myVar1 and myVar2 here before running the suite
      # run the suite here
  </code></pre>
  
  <p>What I want is to read in arguments from the command line and initiate them inside <code>runTests.py</code>, right before I run the suite in the <code>if</code> statement. These variables would also be used inside of <code>Class1</code>, <code>Class2</code>, etc.</p>
  
  <p>Would it be correct if inside <code>runTests.py</code> I have the following before the suite definition</p>
  
  <pre><code>myVar1 = 'defaultValue'
  myVar2 = 'defaultValue'
  </code></pre>
  
  <p>Then in the <code>if</code> statement grab the arguments from the command line and initialize <code>myVar1</code> and <code>myVar2</code>. So in the other classes, eg <code>Class1</code>, I would import it like:</p>
  
  <pre><code>from runTests import myVar1
  from runTests import myVar2
  </code></pre>
  
  <p>Basically, what I want is to read in a few parameters from the command line and be able to use those values in the other classes. Thanks!</p>