@ECHO OFF
test2.py > Output
SET /p MYVAR=<Output
ECHO %MYVAR%
PAUSE
DEL Output
@ECHO OFF
start /PATH/TO/python.exe /PATH/TO/FILE/test2.py > output.txt
for /f "tokens=* delims=" %%x in (output.txt) do (
ECHO %%x
PAUSE
)
DEL output.txt
@ECHO OFF
start /PATH/TO/python.exe /PATH/TO/FILE/test2.py > output.txt
for /f "tokens=* delims=" %%x in (output.txt) do (
ECHO %%x
PAUSE
)
DEL output.txt