Logo Search packages:      
Sourcecode: zeitgeist-extensions version File versions  Download package

def fts::Indexer::_split_uri (   self,
  uri 
) [private]
Returns a triple of (scheme, host, and path) extracted from `uri`

Definition at line 507 of file fts.py.

                                :
            """
            Returns a triple of (scheme, host, and path) extracted from `uri`
            """         
            i = uri.find(":")
            if i == -1 :
                  scheme =  ""
                  host = ""
                  path = uri
            else:
                  scheme = uri[:i]
                  host = ""
                  path = ""
            
            if uri[i+1] == "/" and uri[i+2] == "/":
                  j = uri.find("/", i+3)
                  if j == -1 :
                        host = uri[i+3:]
                  else:
                        host = uri[i+3:j]
                        path = uri[j:]
            else:
                  host = uri[i+1:]
            
            # Strip out URI query part
            i = path.find("?")
            if i != -1:
                  path = path[:i]
            
            return scheme, host, path
      

Generated by  Doxygen 1.6.0   Back to index