title: Global variables accross modules and threads in python
body: <p>I have a config file config.py which holds a global variable, i.e. in config.py I have (5 is the default)</p>
  
  <pre><code># config.py
  globalVar = 5
  </code></pre>
  
  <p>Now in a module run.py I'm setting the global variable and then I call a printing function:</p>
  
  <pre><code># run.py
  import config
  import test
  config.globalVar = 7
  test.do_printing()
  
  # test.py
  import config
  def do_printing():
    print(config.globalVar)
  </code></pre>
  
  <p>This works well (i.e. 7 is printed) but if I use multiple threads for printing (in test.py) it does not work anymore, i.e. then the threads do not see the change made by run.py (i.e. 5 is printed).</p>
  
  <p>How can this be solved?</p>