In batch, I need to read a configuration file written in python that contains multiples variables that I need to set in the batch script !
For example: (variable take are just example, values can be integer, path, ...)
config.py
import time, os
VERSION= "20160801"
PATH = os.getcwd()
...
script.bat
SET VERSION= need to get VERSION variable from config.py
SET PATH = need to get PATH variable from config.py
I have found this solution :
%PYTHON_PATH% -c "import config;print config.VERSION" > output
set /p CURRENT_VERSION=<output
but it functions just to one variable and i need to set around 30 variables, there exist a method to do this faster without import the config.py each time please ?
Why can i make this :
%PYTHON_PATH% -c "import config;print config.VERSION;print config.PATH" > version,path
set CURRENT_VERSION=version
set PATH=path
Thanks