Created
November 15, 2012 11:10
-
-
Save PirosB3/4078059 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.context_managers import settings | |
from fabric.operations import local | |
def run_unix_command(command): | |
with settings(warn_only= True): | |
return local('ls', capture= True) | |
res = run_unix_command('ls -lah') | |
print res.return_code | |
print res.stdout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment