I desesperatly searching for 1 liner load config package in Python 3... In python 2, there is :
https://pypi.python.org/pypi/config/0.3.7
from config import Config; cfg = Config(file('D://config.py', 'r'))
There is https://pypi.python.org/pypi/loadconfig but it does not seem loading file...
Main goal is to install this package in all the python envs and load one big config file for all envs.
Use case:
You have a single piece of python, you want to run on several hardware/OS and python envs (conda,...) without changing the code...
Method 1:
1) Define a generic config files for all Envs needed.
2) At RunTime, determine the environnment (linux, username, ) and
define the absolute path root repository directory with config file.
3) Single piece of code, running in different envs without changing the code, the envs...