Reputation: 11
I have a python script that contains a Linux shell command. I'm using subprocess.check_output
. My question is about the faster python method to execute a Linux shell command from python script like os.system()
.
Upvotes: 1
Views: 119
Reputation: 1
The better way:
from subprocess import call
call('ls')
Please check: https://docs.python.org/2/library/subprocess.html
Upvotes: 0
Reputation: 1354
Upvotes: 0