Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

run a shell script from python

import subprocess

output = subprocess.check_output('pidstat -p ALL'.split(' '), stderr=subprocess.STDOUT, universal_newlines=True)
print(output)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #run #shell #script #python
ADD COMMENT
Topic
Name
6+2 =