title: ValueError: Attempted relative import in non-package
body: <p>I have two Python files, one stored in the location <code>/Python/plata.py</code>, and another in the location <code>/Python/tao/mock.py</code>. This is what my <code>plata.py</code> file looks like::</p>
  
  <pre><code>def printSomething():
      print 'This is a test.'
  </code></pre>
  
  <p>I'm trying to import the <code>printSomething()</code> function inside my <code>mock.py</code> file as follows:</p>
  
  <pre><code>from . import plata
  
  plata.printSomething()
  </code></pre>
  
  <p>However, this is the error I'm encountering:</p>
  
  <pre><code>Traceback (most recent call last):
  File "/home/manas/Python/tao/mock.py", line 1, in &lt;module&gt;
  from . import plata
  ValueError: Attempted relative import in non-package
  </code></pre>
  
  <p>I've included the <code>__init__.py</code> files in locations <code>/Python/__init__.py</code> and <code>/Python/tao/__init__.py</code> as well. However, I'm still encountering the same error.</p>
  
  <p>What seems to be wrong here?</p>