title: Python Project Issue: Import from parent folder or change project architecture
body: <p>I have a problem with my Python project. My project parses different recipe websites for each recipe and writes the recipe data to a text file. </p>
  
  <p><strong>My Problem:</strong> I cannot import a python file/module that resides in the parent directory. This file contains generic functions that parse webpages. I get an error when I do so: "ValueError: Attempted relative import in non-package"</p>
  
  <p><strong>My solution:</strong> I dont know what my solution is? I am thinking I either need to find a way to import a file from the parent directory or to change my project architecture so every domain parsing script sits in the same directory</p>
  
  <p><strong>Project Architecture:</strong> </p>
  
  <pre><code>Test Folder:  
      __init__.py   
      UtilityFunctions.py     # the file I am importing  
      PerformAllIndexing.py 
      all_recipes:
          __init__.py
          index.py            # imports ../UtilityFunctions.py
      simply_recipes:
         __init__.py
          index.py            # imports ../UtilityFunctions.py
  </code></pre>
  
  <p>Each subdirectory contains a file called <em>index.py</em> that can extract recipe name, ingredients and directions for a specific website and writes it to a text file. </p>
  
  <p>I encourage you to download my project to get a detailed understanding of my problem: <a href="http://www.mediafire.com/?ynup22oe8ofam21" rel="nofollow">http://www.mediafire.com/?ynup22oe8ofam21</a></p>
  
  <p><em>Can you tell me what I can do to import a python module from a parent directory or how I can change my project architecture to make this work without having repeating code(the code residing in UtilityFunctions.py)?</em></p>