Robot / scripts /_pyrun.cmd
Duc Do
Upload 254 files
6686473 verified
Raw
History Blame Contribute Delete
527 Bytes
@echo off
REM Cross-platform Python launcher for AI log hooks (Windows cmd.exe).
REM Tries py -3 -> python -> python3 in order, runs the given script with all args.
REM Exits 0 silently if no Python is found - hooks must never block the AI tool.
where py >nul 2>nul
if %ERRORLEVEL%==0 (
py -3 %*
exit /b %ERRORLEVEL%
)
where python >nul 2>nul
if %ERRORLEVEL%==0 (
python %*
exit /b %ERRORLEVEL%
)
where python3 >nul 2>nul
if %ERRORLEVEL%==0 (
python3 %*
exit /b %ERRORLEVEL%
)
exit /b 0