title: Imports inside package now that __init__.py is optional
body: <p>I'm building a package that contains scripts to be run. They import modules contained in a subfolder directly under the script. Now that <a href="https://stackoverflow.com/a/39991978/7089239"><code>__init__</code> is not required after Python 3.3</a>, what's the correct file structure and <code>import</code> statement to have? I'd like to not have to specify the import from the topmost folder down, only as a relative path, here <code>sub/module</code>.</p>
  
  <p>This is the current state of the file structure:</p>
  
  <pre><code>Root\
      src\
          sub\
              module.py
          script.py
          parent_module.py
      setup.py
  
  # Inside script.py
  import sub.module      # Doesn't work
  from sub import module # Doesn't work
  import src.sub.module  # Does work!
  
  import .sub.module     # Doesn't work
  import .parent_module  # Does work!
  </code></pre>
  
  <p>I imagine I need to have <em>some</em> <code>__init__</code> file, but what and where would that be? Any help is greatly appreciated, I don't know much about packaging.</p>
  
  <p>Also, I'm certainly open to suggestions to changing the structure, if that makes things easier.</p>