title: Attempted relative import beyond top-level package Error
body: <p>I have a folder xyz which contains two files ab.py and cd.py. Im trying to import cd.py in ab.py file.</p>
  
  <p>Below is the folder structure:</p>
  
  <pre><code>/xyz
      ab.py
      cd.py
  </code></pre>
  
  <p>I have to import cd to ab</p>
  
  <p>when i do </p>
  
  <pre><code>from . import cd
  </code></pre>
  
  <p>This gives me error as: 
  Attempted relative import beyond top-level package</p>