title: right way to modify a variable of the main prgm in an aux prgm in python
body: <p>I can't seem to find the right way to do this. I have a main module with a variable <code>x</code> and an auxiliary module that must be able to update <code>x</code>.</p>
  
  <p>The following does not work:</p>
  
  <pre><code>#main.py
  import aux
  x=0
  aux.update()
  
  #aux.py
  import main
  def update():
     main.x += 1
  </code></pre>
  
  <p>It seems to be possible with a <code>third</code> module holding <code>x</code>:</p>
  
  <pre><code>#main.py
  import aux,third
  third.x = 0
  aux.update()
  
  #aux.py
  import third
  def update():
     third.x += 1
  
  #third.py
  x = 0
  </code></pre>
  
  <p>Is this <code>third</code> module necessary? Is there a "better way"?</p>