title: Is it possible to access the variables in __init__.py from the modules in the same package?
body: <p>I have a hello1 package that contains good.py module. </p>
  
  <pre><code>hello1
  ├── __init__.py
  └── good.py
  </code></pre>
  
  <p>The <strong>init</strong> module has a variable <code>A = 1</code>, and I need to access the variable hello1.A in good.py.</p>
  
  <pre><code>import hello1
  
  class Good(object):
      def __init__(self):
          print hello1.A
  
  if __name__ == "__main__":
      g = Good()
  </code></pre>
  
  <p>The issue is that when I execute the python script I got <code>ImportError: 'No module named hello1'</code> error. I could add <code>import sys; sys.path.append("..")</code> at the first line of <code>good.py</code> for a quick fix. </p>
  
  <p>However, the good.py is in hello1 package where the __init__.py is also in, so I wonder if there is a way to access the variables in __init__.py from the modules in the same package. </p>