Considering this batch file : "c.bat"
echo "Ok"
TIMEOUT /T 5 /NOBREAK > nul
and this python script : "main.py"
import os
filepath="C:/Users/david.rouyre/Desktop/c.bat"
os.system(f"start /wait {filepath}")
All works fine when I run the script. But when I run it with VSCode, i have the following error for TIMEOUT command :
C:\Users\david.rouyre>echo "Ok"
"Ok"
C:\Users\david.rouyre>TIMEOUT /T 5 /NOBREAK 1>nul
TIMEOUT: invalid time interval ‘/T’
Try 'TIMEOUT --help' for more information.
C:\Users\david.rouyre>pause
Appuyez sur une touche pour continuer...
Except the TIMEOUT error, the two cmds windows are similar. In both cases i use python 3.9.10 (i also tested 3.7)
I tried using subprocess.Popen but it's the same result.
Do you have any idea to resolve this problem ?