Reputation: 10043
given this folder structure:
search/
__init__.py
blogs.py
database/
__init__
tags.py
if I'm working at tags.py
, how can I import
a class called crawler
inside blogs.py
?
Upvotes: 2
Views: 116
Reputation: 5599
You can use the following in tags.py
:
import sys
sys.path.append('../')
from search.blogs import crawler
Upvotes: 4