pyque/sh.py
def sh(cmd, escape=True):
    """ Executes the given command.
    returns a 2-tuple with returncode (integer) and OUTPUT (string)
    """

    if escape:
        cmd = quote(cmd)

    process = Popen(cmd, stdout=PIPE, stderr=STDOUT, shell=True)
    output, unused_err = process.communicate()
    retcode = process.poll()

    return (retcode, output)
def sh(cmd, escape=True):
    """ Executes the given command.
    returns a 2-tuple with returncode (integer) and OUTPUT (string)
    """

    if escape:
        cmd = quote(cmd)

    process = Popen(cmd, stdout=PIPE, stderr=STDOUT, shell=True)
    output, unused_err = process.communicate()
    retcode = process.poll()

    return (retcode, output)
Executes the given command.
    returns a 2-tuple with returncode (integer) and OUTPUT (string)