import subprocess output = subprocess.check_output(['cd', 'C:\\ProgramData', '&&', 'mkdir', 'boot']) print output Why does not it work?
import subprocess output = subprocess.check_output(['cd', 'C:\\ProgramData', '&&', 'mkdir', 'boot']) print output Why does not it work?
Add a shell=True parameter to the call. It is necessary, when not real executables are called, but interpreter commands.
PS As I understand it, on Windows nothing is given by the transfer of commands in a list, just write the full command line in the call.
shell=True - mkkikSource: https://ru.stackoverflow.com/questions/852586/
All Articles