title: Python: How can I import all variables?
body: <p>I'm new to Python and programming in general (a couple of weeks at most).</p>
  
  <p>Concerning Python and using modules, I realise that functions can imported using <code>from a import *</code>.</p>
  
  <p>So instead of typing</p>
  
  <pre><code>a.sayHi()
  a.sayBye()
  </code></pre>
  
  <p>I can say</p>
  
  <pre><code>sayHi()
  sayBye()
  </code></pre>
  
  <p>which I find simplifies things a great deal. Now, say I have a bunch of <em>variables</em> that I want to use across modules and I have them all defined in one python module. How can I, using a similar method as mentioned above or an equally simple one, import these variables. I don't want to use <code>import a</code> and then be required to prefix all my variables with <code>a.</code>.</p>
  
  <p>The following situation would by ideal:</p>
  
  <p>a.py</p>
  
  <pre><code>name = "Michael"
  age = 15
  </code></pre>
  
  <p>b.py</p>
  
  <pre><code>some_function
  
  if name == "Michael":
      if age == 15:
          print("Simple!") 
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Simple!
  </code></pre>