I'm working on a python code that calls a VB script aiming to perform some calculations. These calculations MUST be performed in the VB script and there is no way to migrate them to the Python one.
I send the variables in the VB script like this:
WScript.Echo("TEST")
And try to acquire them in the Python code as:
p = subprocess.Popen(['cscript.exe', VB_path, nLM, nSD, nSO, nTWS, nROH,
nMOH1, nMOH2, nRad1, nRad3, nLstk, nT_Shaft_EN, S_path,
S_file, S_version, nkE_ref, nTC_ref, nNImax, nCost_PM,
nCost_Steel, nCost_Wire, '//nologo'], stdout=subprocess.PIPE, shell=True)
out, err = p.communicate()
out
The result I get for "out" is the following:
b'Test\r\n'
My question is: how I can send several outputs with the plain variable ? Also, as a bonus question, is there any obvious way to send an array in this kind of way from vb to the python script ?