I'm trying to send arguments from a Python script to a batch script, but the batch file keeps failing.
This is what is written in the Python script:
cond = 'a'
sp3 = subprocess.Popen([os.path.join(lua_caller_pth[:indx], 'lua_caller1.bat'), cond])
cond = 'b'
sp4 = subprocess.Popen([os.path.join(lua_caller_pth[:indx], 'lua_caller1.bat'), cond])
And this is the batch script:
if %cond% == "a" (
%CYGWINPATH%\bash -l -c "cd $START_DIR \ && cd .. \ && cd Debug \ && ./iv4_console.exe ../embedded/LUA/analysis/verbose-udp-toxml.lua &>../Object_Detection_Test_Script/xmllog1 \ && exit; bash";
)
if %cond% == "b" (
%CYGWINPATH%\bash -l -c "cd $START_DIR \ && cd .. \ && cd Debug \ && ./iv4_console.exe ../embedded/LUA/analysis/verbose-udp-toxml.lua &>../Object_Detection_Test_Script/xmllog2 \ && exit; bash";
)