parameters: (self, host, command, ignoreFailures=False, bg=False, **kwargs)
docstring: Execute a remote command.
  
          @return: If bg is True then a Process corresponding to the command
                   which was run, otherwise None.
docstring_summary: Execute a remote command.
docstring_tokens: Execute a remote command .
function: def rsh(self, host, command, ignoreFailures=False, bg=False, **kwargs):
          """Execute a remote command.
  
          @return: If bg is True then a Process corresponding to the command
                   which was run, otherwise None.
          """
          if bg:
              sonce = ''.join([chr(random.choice(range(ord('a'), ord('z'))))
                               for c in range(8)])
              # Assumes scripts are at same path on remote machine
              sh_command = ['ssh', host,
                            '%s/regexec' % scripts_path, sonce,
                            os.getcwd(), "'%s'" % command]
              p = subprocess.Popen(sh_command, **kwargs)
              process = self.Process(host, command, kwargs, sonce,
                                     p, ignoreFailures)
              self.processes.append(process)
              return process
          else:
              self.rsh(host, command, ignoreFailures, bg=True,
                       **kwargs).proc.wait()
              self.checkFailures()
              return None
function_tokens: def rsh ( self , host , command , ignoreFailures = False , bg = False , * * kwargs ) : if bg : sonce = '' . join ( [ chr ( random . choice ( range ( ord ( 'a' ) , ord ( 'z' ) ) ) ) for c in range ( 8 ) ] ) # Assumes scripts are at same path on remote machine sh_command = [ 'ssh' , host , '%s/regexec' % scripts_path , sonce , os . getcwd ( ) , "'%s'" % command ] p = subprocess . Popen ( sh_command , * * kwargs ) process = self . Process ( host , command , kwargs , sonce , p , ignoreFailures ) self . processes . append ( process ) return process else : self . rsh ( host , command , ignoreFailures , bg = True , * * kwargs ) . proc . wait ( ) self . checkFailures ( ) return None