title: Exposing classes inside modules within a Python package directly in the package's namespace
body: <p>I have a wxPython application with the various GUI classes in their own modules in a package called <code>gui</code>. With this setup, importing the main window would be done as follows:</p>
  
  <pre><code>from gui.mainwindow import MainWindow
  </code></pre>
  
  <p>This looked messy to me so I changed the <code><code>__init__.py</code></code> file for the <code>gui</code> package to import the class directly into the package namespace:</p>
  
  <pre><code>from mainwindow import MainWindow
  </code></pre>
  
  <p>This allows me to import the main window like this:</p>
  
  <pre><code>from gui import MainWindow
  </code></pre>
  
  <p>This looks better to me aesthetically and I think it also more closely represents what I'm doing (importing the <code>MainWindow</code> class from the <code>gui</code> "namespace"). The reason I made the <code>gui</code> package was to keep all the GUI stuff together. I could have just as easily made a single <code>gui</code> module and stuffed all the GUI classes in it, but I think that would have been unmanageable. The package now appears to work like a module, but allows me to separate the classes into their own modules (along with helper functions, etc.).</p>
  
  <p>This whole thing strikes me as somewhat petty, I just thought I'd throw it out there to see what others think about the idea.</p>