My current directory structure
prem
.
├── __init__.py
├── test1.py
├── test2.py
test1.py
print 'test1.py'
test2.py
import sys
sys.path.append('/opt/sw/p3/src/prem')
print sys.path
from . import test1
Error
from . import test1
ValueError: Attempted relative import in non-package
When I display the path , I see this directory - /opt/sw/p3/src/prem