Calling variables from other files in Python
<p>I'm trying to import files and here is the situation.</p>

<p>file1.py contains:</p>

<pre><code>from file2 import *
username = "steven"

action()
</code></pre>

<p>file2.py contains:</p>

<pre><code>def action():
    print username 
</code></pre>

<p>But i can't print the username because the variable 'username' is declared in file1 but not file2 (for the function uses the variable)</p>

<p>This is not the actual code, but can I not use variables from file1 in functions from file2?</p>
