Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python execute shell command and get output

import subprocess
process = subprocess.Popen(['echo', 'More output'],
                     stdout=subprocess.PIPE, 
                     stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
stdout, stderr
Source by janakiev.com #
 
PREVIOUS NEXT
Tagged: #python #execute #shell #command #output
ADD COMMENT
Topic
Name
6+9 =