(self, filename, path, rootdir="")
return ""
Find file in a path set such as PATH=/usr/bin:/bin
Find file in a path set such as PATH=/usr/bin:/bin
Find file in a path set such as PATH = / usr / bin : / bin
def find_inpath(self, filename, path, rootdir=""):
        """Find file in a path set such as PATH=/usr/bin:/bin"""
        if not (filename and path):
            return ""
        basename = os.path.basename(filename)
        if is_genstr(path):
            if "=" in path:
                path = "".join(path.split("=", 1)[1:])
            path = path.split(":")
        if isinstance(path, (list, tuple)):
            for directory in path:
                full_path = rootdir + directory + "/" + basename
                if os.path.lexists(full_path):
                    return directory + "/" + basename
            return ""
        return ""
def find_inpath ( self , filename , path , rootdir = "" ) : if not ( filename and path ) : return "" basename = os . path . basename ( filename ) if is_genstr ( path ) : if "=" in path : path = "" . join ( path . split ( "=" , 1 ) [ 1 : ] ) path = path . split ( ":" ) if isinstance ( path , ( list , tuple ) ) : for directory in path : full_path = rootdir + directory + "/" + basename if os . path . lexists ( full_path ) : return directory + "/" + basename return "" return ""