ragtag_utilities/utilities.py
def run_o(cmd, out):
    """ Run a command and redirect stdout but not stderr. """

    if not isinstance(out, str):
        raise TypeError("out should be a file name (string)")

    f_out = open(out, "w")

    log("INFO", "Running: %s > %s" % (" ".join(cmd), out))
    if subprocess.call(cmd, stdout=f_out) != 0:
        raise RuntimeError("Failed : %s > %s" % (" ".join(cmd), out))

    log("INFO", "Finished running : %s > %s" % (" ".join(cmd), out))

    f_out.close()
 Run a command and redirect stdout but not stderr. 
Run a command and redirect stdout but not stderr.
Run a command and redirect stdout but not stderr .
def run_o(cmd, out):
    if not isinstance(out, str):
        raise TypeError("out should be a file name (string)")
    f_out = open(out, "w")
    log("INFO", "Running: %s > %s" % (" ".join(cmd), out))
    if subprocess.call(cmd, stdout=f_out) != 0:
        raise RuntimeError("Failed : %s > %s" % (" ".join(cmd), out))
    log("INFO", "Finished running : %s > %s" % (" ".join(cmd), out))
    f_out.close()
def run_o ( cmd , out ) : if not isinstance ( out , str ) : raise TypeError ( "out should be a file name (string)" ) f_out = open ( out , "w" ) log ( "INFO" , "Running: %s > %s" % ( " " . join ( cmd ) , out ) ) if subprocess . call ( cmd , stdout = f_out ) != 0 : raise RuntimeError ( "Failed : %s > %s" % ( " " . join ( cmd ) , out ) ) log ( "INFO" , "Finished running : %s > %s" % ( " " . join ( cmd ) , out ) ) f_out . close ( )
Run a command and redirect stdout but not stderr.
Run a command and redirect stdout but not stderr .
""" Run a command and redirect stdout but not stderr. """
cmd
out