Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Executes command as root.
params:
    command
returns:
    returncode
    out - string
    err - string

        def execute(command):
    """
    Executes command as root.
    params:
        command
    returns:
        returncode
        out - string
        err - string
    """
    
    exec_log.debug("Executor - execute: command=%s" % command)   
 
    sp =  subprocess.Popen(command, shell=True,
                              stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    out, err = sp.communicate()
    return sp.returncode, out, err
        


src/p/2/P2PEM-0.1/P2PEM/manager/manager.py   P2PEM(Download)
        """
        try:
            rc, out, err = executor.execute("free -m | tail -1 | tr -s ' ' | cut -d ' ' -f 3")
            swap = int(out)
            if swap < self.swap_limit: