title: Global Variable from a different file Python
body: <p>So I have two different files somewhat like this:</p>
  <p>file1.py</p>
  <pre class="lang-py prettyprint-override"><code>from file2 import *
  foo = &quot;bar&quot;
  test = SomeClass()
  </code></pre>
  <p>file2.py</p>
  <pre class="lang-py prettyprint-override"><code>class SomeClass :
      def __init__ (self):
          global foo
          print foo
  </code></pre>
  <p>However I cannot seem to get file2 to recognize variables from file1 even though its imported into file1 already. It would be extremely helpful if this is possible in some way.</p>