How to set dynamic global variables in Python?
<p>Let's say I've a file <code>a.py</code> and <code>a</code> has a variable <code>var</code>. </p>

<p>In file <code>b.py</code>, I imported, <code>a.py</code> and set <code>a.var = "hello"</code>.</p>

<p>Then I imported <code>a.py</code> in <code>c.py</code> and tried to access <code>a.var</code> but I get <code>None</code>. </p>

<p>How to reflect the change in data? It is obvious that two different instances are getting called, but how do I change it?</p>

<p>Edit:</p>

<p>What I am trying to do here is create a config file which constitutes of this:</p>

<pre><code>CONFIG = {
    'client_id': 'XX',
    'client_secret': 'XX',
    'redirect_uri': 'XX'
    }

auth_token = ""

auth_url = ""

access_point = ""
</code></pre>

<p>Now, let's say I use config.py in the script a.py and set config.access_point = "web"</p>

<p>So, if I import config.py in another file, I want the change to reflect and not return "". </p>

<p>Edit: </p>

<p>Text file seems like an easy way out. I can also use ConfigParser module. But isn't it a bit too much if reading form a file needs to be done in every server request? </p>
