I'm having difficultly with important a python module from another folder. Here's how my folder looks currently
foldername/
    __init__.py
    A/
        __init__.py
        spam.py
        grok.py
    B/
        __init__.py
        foo.py
I'm trying to import the functions and classes from the grok.py file into the foo.py in B. This is how my foo.py looks like 
from ..A.spam import func 
However, I get the following error:
ValueError: attempted relative import beyond top-level package
Could somebody help me? I don't understand where I'm going wrong
 
     
    