REM This batch file calls the Python script and uses its output REM Call the Python script and store its output in the MY_VAR variable for /f "delims=" %%i in ('python getCOM.py') do set MY_VAR=%%i ...