novice to python,
enter the specified directory to execute a command
see a solution. What I understand is that the semicolon is preceded by entering the folder, followed by the execution of the command, but executed in windows
import os
os.system("cd D:/ANDROID/test1/HBuilder-Integrate-AS;./gradle assembleRelease")
import os
os.system("cd ~/cstudy;./sdkTest")
problem solving:
1.1l boss"s solution is the best. Fully applicable
2. You can also use os.system ("cd:./xxxx/xxx & & gradle assembleRelease"). The disadvantage is that there is a problem across the drive