title: Global variables to submodule
body: <p>I have a module which consists of function that uses functions imported from another module. Lets call it the main function. </p>
  
  <p>I want to set some variables in the main function as globals and use them in the functions of imported submodules as globals (there's specific thing that I can't use them as arguments of function)
  Can't figure out how to do this. My example:</p>
  
  <pre><code>#submodule.py
  def subfunction():
      print COLORS
  
  #mainmodule.py
  
  from submodule import subfunction
  
  def main(colors, x, y, z):
      global COLORS
      COLORS=colors
      subfunction()
  </code></pre>