App
ㄴCore
ㄴ Controllers
ㄴ working.py
ㄴ Components
ㄴ Elements
ㄴAA.py
ㄴAB.py
(...)
ㄴZZ.py
ㄴ DTO
ㄴH.py
ㄴI.py
ㄴk.py
ㄴConfig
ㄴE.py
ㄴF.py
ㄴDB
ㄴdb.py
ㄴUtil
ㄴutils.py
In the elements folder, import Config folder's python file and its classes
utils.py imported on most of all files.
In elements folder, there are many python files.
And, most of python files need to import classes in same directory's files.
And, most of python files need to import classes in DTO folders.
the python files in elements folder is imported hierarchically.
On my computer, it is not possible to register sys.path(app_directory)
When I tried to import AA to AB
from AA import aa
This is not working.
So, I added __init__
in the components folder. And, importing AA to ZZ using __import__
.
Then from AA import aa
is working.
But, although I added app directory using sys.path.append
on __init__
, for instances, from app.DB.db import db
, from core.DTO.H import h
, from DTO.H import h
, from H import h
, from . import h
is not working at python files in Elements folder.
I want to import necessary python files and classes.