Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::wnettools::Interface::_find_client_path (   self,
  client 
) [private]

Determines the full path for the given program.

Searches a hardcoded list of paths for a given program name.

Keyword arguments:
client -- The name of the program to search for

Returns:
The full path of the program or None

Definition at line 192 of file wnettools.py.

00192                                        :
        """ Determines the full path for the given program.
        
        Searches a hardcoded list of paths for a given program name.
        
        Keyword arguments:
        client -- The name of the program to search for
        
        Returns:
        The full path of the program or None
        
        """
        paths = ['/sbin/', '/usr/sbin/', '/bin/', '/usr/bin/',
                 '/usr/local/sbin/', '/usr/local/bin/']
        for path in paths:
            if os.access("%s%s" % (path, client), os.F_OK):
                return "%s%s" % (path, client)
        if self.verbose:
            "WARNING: No path found for %s"  % (client)
        return None
        
    def _client_found(self, client):


Generated by  Doxygen 1.6.0   Back to index