Giả sử mình có cấu trúc thư mục như này:
MyProj/
scripts/
__init__.py
file1.py
tests/
__init__.py
file2.py
Câu hỏi là làm sao để import được file1 vào file2?
Mình đã thử viết thế này trong file2 nhưng không hoạt động:
import MyProj.scripts.file1
Nó báo lỗi không tìm thấy module tên là MyProj