I would like to import the config file. it from sub-directory
├── config
│ ├── config.py
│ ├── database.ini
│ └── log.py
├── main.py
config.py
def function(file='database.ini',section='sql'):
return
database.ini
[sql]
host=1.1.1.1
user=admin
password=admin
database=sql
main.py
from config.config import function
def Run():
Test = function()
if __name__=="__main__":
Run()
The error warning look like
"Section sql not found in the database.ini file"
Now you see the structure of project. How to fix this?