Logo Search packages:      
Sourcecode: nagios-plugins version File versions

def utils::Task::__init__ (   self,
  command 
)

Constructor.
   arguments:
       command: the command to run, in the form of a string,
        or a tuple or list of words.
   

Definition at line 71 of file utils.py.

00071                               :
        """Constructor.
           arguments:
               command: the command to run, in the form of a string,
                        or a tuple or list of words.
           """
        if type(command)==type(''):
            self.cmd=command
            self.words=string.split(command)
        elif type(command)==type([]) or type(command)==type(()):
            # Surround each word by ' '. Limitation: words cannot contain ' chars
            self.cmd="'"+string.join(command,"' '")+"'"
            self.words=tuple(command)
        else:
            raise error("command must be tuple, list, or string")
        self.pid=None
        self.status=None

    def Run(self,usesh=0,detach=0,stdout=None,stdin=None,stderr=None):


Generated by  Doxygen 1.6.0   Back to index