Answer the question
In order to leave comments, you need to log in
How to pass several commands to cmd at once in Python?
Hello.
I want to execute several commands from python at once,
for example, chcp and ping 192.168.10.41
import os
cmd = 'список команд'
os.system(cmd)
Answer the question
In order to leave comments, you need to log in
Two commands at the same time:
Two commands in series:cmd = 'echo hi ; echo hello'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question