I have the following directory:
- IoT [Folder]
- DC [Folder]
- main.py
- config.ini
- DC [Folder]
inside main.py
I have:
config.read('config.ini')
which works perfect if I run my python script after doing cd .....IoT/DC
But it doesn't work once I run my python script directly from IoT folder, how can I solve this?
I can't know from which folder my program will be run...
If I have to choose one I prefer running it directly from IoT like this:
python3 DC/main.py