__init__.py :: make a submodule routines available at top level import
<p>Assume the following structure...</p>

<pre><code>root/test.py
root/myapp/__init__.py
root/myapp/myapp.py       # contains My_App_Class()
root/myapp/SomeObject.py  # contains My_Obj_Class()
</code></pre>

<p>If my <code>__init__.py</code> contains the following structure:</p>

<pre><code>from myapp import *
import SomeObject

__all__ = ['SomeObject']
</code></pre>

<p>I want to be able to call <code>myapp</code> and have the routines pre-extracted from <code>myapp/myapp.py</code> so that I can do the following in <code>test.py</code>:</p>

<pre><code>import myapp

if 'My_App_Class' in myapp.__dict__.keys():
    print 'success'
else:
    print 'fail'

if 'My_Obj_Class' in myapp.SomeObject.__dict__.keys():
    print 'success'
else:
    print 'fail'
</code></pre>

<p>so that I can effectively collapse <code>from myapp.myapp import *</code> into <code>from myapp import *</code></p>

<pre><code>In [1]: %run test.py
fail
success
</code></pre>