(self, path=None)
The script_name of the app at the given path, or None.

        If path is None, cherrypy.request is used.
The script_name of the app at the given path, or None.
The script_name of the app at the given path or None .
def script_name(self, path=None):
        """The script_name of the app at the given path, or None.

        If path is None, cherrypy.request is used.
        """
        if path is None:
            try:
                request = cherrypy.serving.request
                path = httputil.urljoin(request.script_name,
                                        request.path_info)
            except AttributeError:
                return None

        while True:
            if path in self.apps:
                return path

            if path == '':
                return None

            # Move one node up the tree and try again.
            path = path[:path.rfind('/')]
def script_name ( self , path = None ) : if path is None : try : request = cherrypy . serving . request path = httputil . urljoin ( request . script_name , request . path_info ) except AttributeError : return None while True : if path in self . apps : return path if path == '' : return None # Move one node up the tree and try again. path = path [ : path . rfind ( '/' ) ]