Return to Snippet

Revision: 1167
at September 20, 2006 13:09 by jacobian


Updated Code
def shell(*cmd):
    pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = pipe.communicate()
    return pipe.returncode, stdout, stderr

Revision: 1166
at September 20, 2006 13:09 by jacobian


Initial Code
def shell(*cmd):
    pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = pipe.communicate()
    return pipe.returncode, stdout, stderr

Initial URL

                                

Initial Description

                                

Initial Title
Simple shell() function

Initial Tags
python

Initial Language
Python