title: Python: What to put in __init__.py files if I'm using several subpackages?
body: <p>I buily a package with a folder structure like the following:</p>
  
  <pre><code>MyPackage
  |
  ├──mypackage
  |     |
  |     ├── __init__.py
  |     |
  |     ├── config.py
  |     |
  |     ├── data_clean
  |     |   ├── __init__.py
  |     |   └── f1.py
  |     |
  |     ├── data_transform
  |     |   ├── __init__.py
  |     |   └── g1.py
  |     |
  |     └── stat_calc
  |         ├── __init__.py
  |         ├── s1.py
  |         └── command_line_interface.py # &lt;- users will use this from cmd.exe
  | 
  ├── README.txt    
  |
  └── setup.py
  </code></pre>
  
  <p>All 4 <code>__init__.py</code> files are empty. Originally, when I wanted <code>s1.py</code> to use a function in <code>g1.py</code>, I would do </p>
  
  <pre><code>import mypackage.data_transform.g1
  </code></pre>
  
  <p>and then somewhere down the line I would do </p>
  
  <pre><code>mypackage.data_transform.g1.my_func()
  </code></pre>
  
  <p>Then, to save, space I changed all of the imports to look like </p>
  
  <pre><code>from mypackage.data_transform.g1 import my_func
  </code></pre>
  
  <p>and then I would use <code>my_func</code> somewhere. This new syntax is getting a lot of errors, I'm not sure what I should do or if/what I should put stuff into the <code>__init__.py</code> files.</p>