I would like to execute the following Windows 7 commands from Python:
SET PATH=%PATH%;C:\Qt\Qt5.5.1\5.5\mingw492_32\bin;C:\Qt\Qt5.5.1\Tools\mingw492_32\bin
C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\qmake untitled5.pro
C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\mingw32-make
C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\mingw32-make clean
I tried:
os.system("SET PATH=%PATH%;C:\\Qt\\Qt5.5.1\\5.5\\mingw492_32\\bin;C:\\Qt\\Qt5.5.1\\Tools\\mingw492_32\\bin")
os.system("qmake untitled5.pro")
os.system("mingw32-make.exe")
os.system("mingw32-make clean")
But got:
'qmake' is not recognized as an internal or external command,
operable program or batch file.
'mingw32-make.exe' is not recognized as an internal or external command,
operable program or batch file.
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
It seems the PATH doesn't get changed. Would some one give an idea?
if I put these commands in cmd.bat
and then call os.system("cmd.bat")
it works. But I'll prefer not to create this additional file (cmd.bat
).