0

How can I add a import task module to my execute module? This is a

aaa/
    bbb/
        ccc/
           tasks.py
    ddd/
        eee/
           execute.py
arthurn
  • 3
  • 2

1 Answers1

2

You can add the directory of tasks.py to the path and then import:

import sys
import os
sys.path.append(os.path.abspath("../../bbb/ccc/"))
import tasks
noteness
  • 2,440
  • 1
  • 15
  • 15