Answers for "run multiple command line with subprocess"

0

run multiple command line with subprocess

def subprocess_cmd(command):
    process = subprocess.Popen(command,stdout=subprocess.PIPE, shell=True)
    proc_stdout = process.communicate()[0].strip()
    print proc_stdout

subprocess_cmd('echo a; echo b')
 # example single command
  subprocess.Popen('rosrun  topic_tools mux cmd_vel auto_cmd_vel manual_cmd_vel mux:=mux_cmd_vel', shell= True)
Posted by: Guest on May-18-2021

Code answers related to "run multiple command line with subprocess"

Browse Popular Code Answers by Language