Did I find the right examples for you? yes no

All Samples(20)  |  Call(15)  |  Derive(0)  |  Import(5)
Returns a valid URL-encoded version of the given value.
    

        def url_escape(value):
    """Returns a valid URL-encoded version of the given value.
    """
    
    return urllib.quote_plus(utf8(value))
        


src/i/p/ipython-2.0.0/IPython/html/tree/handlers.py   ipython(Download)
from tornado import web
from ..base.handlers import IPythonHandler, notebook_path_regex, path_regex
from ..utils import url_path_join, path2url, url2path, url_escape, is_hidden
 
#-----------------------------------------------------------------------------
    def generate_breadcrumbs(self, path):
        breadcrumbs = [(url_escape(url_path_join(self.base_url, 'tree')), '')]
        comps = path.split('/')
        ncomps = len(comps)
        for i in range(ncomps):
            if comps[i]:
                link = url_escape(url_path_join(self.base_url, 'tree', *comps[0:i+1]))
            for i in range(len(comps)-2):
                comps.pop(0)
        page_title = url_escape(url_path_join(*comps))
        if page_title:
            return page_title+'/'
        if name is not None:
            # is a notebook, redirect to notebook handler
            url = url_escape(url_path_join(
                self.base_url, 'notebooks', path, name
            ))

src/i/p/ipython-HEAD/IPython/html/tree/handlers.py   ipython(Download)
from tornado import web
from ..base.handlers import IPythonHandler, notebook_path_regex, path_regex
from ..utils import url_path_join, url_escape
 
#-----------------------------------------------------------------------------
    def generate_breadcrumbs(self, path):
        breadcrumbs = [(url_escape(url_path_join(self.base_url, 'tree')), '')]
        comps = path.split('/')
        ncomps = len(comps)
        for i in range(ncomps):
            if comps[i]:
                link = url_escape(url_path_join(self.base_url, 'tree', *comps[0:i+1]))
        if name is not None:
            # is a notebook, redirect to notebook handler
            url = url_escape(url_path_join(
                self.base_url, 'notebooks', path, name
            ))
    def get(self, path=''):
        url = url_escape(url_path_join(
            self.base_url, 'tree', path.strip('/')
        ))
        self.log.debug("Redirecting %s to %s", self.request.path, url)

src/i/p/ipython-2.0.0/IPython/html/notebook/handlers.py   ipython(Download)
 
from ..base.handlers import IPythonHandler, notebook_path_regex, path_regex
from ..utils import url_path_join, url_escape
 
#-----------------------------------------------------------------------------
        if not nbm.notebook_exists(name, path):
            raise web.HTTPError(404, u'Notebook does not exist: %s/%s' % (path, name))
        name = url_escape(name)
        path = url_escape(path)
        self.write(self.render_template('notebook.html',
 
            url = url_path_join(self.base_url, 'files', path)
        url = url_escape(url)
        self.log.debug("Redirecting %s to %s", self.request.path, url)
        self.redirect(url)

src/i/p/ipython-HEAD/IPython/html/notebook/handlers.py   ipython(Download)
 
from ..base.handlers import IPythonHandler, notebook_path_regex, path_regex
from ..utils import url_path_join, url_escape
 
#-----------------------------------------------------------------------------
        if not nbm.notebook_exists(name, path):
            raise web.HTTPError(404, u'Notebook does not exist: %s/%s' % (path, name))
        name = url_escape(name)
        path = url_escape(path)
        self.write(self.render_template('notebook.html',
 
            url = url_path_join(self.base_url, 'files', path)
        url = url_escape(url)
        self.log.debug("Redirecting %s to %s", self.request.path, url)
        self.redirect(url)

src/t/h/thruflo.webapp-0.1.3/src/thruflo/webapp/cache.py   thruflo.webapp(Download)
from redis import Redis as BaseRedis
 
from utils import url_escape
 
KEY_PREFIX = u'thruflo.'