Did I find the right examples for you? yes no

All Samples(36)  |  Call(30)  |  Derive(0)  |  Import(6)

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+'/'
            # is a notebook, redirect to notebook handler
            url = url_escape(url_path_join(
                self.base_url, 'notebooks', path, name
            ))
            self.log.debug("Redirecting %s to %s", self.request.path, url)

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]))
            for i in range(len(comps)-2):
                comps.pop(0)
        page_title = url_path_join(*comps)
        if page_title:
            return page_title+'/'
            # is a notebook, redirect to notebook handler
            url = url_escape(url_path_join(
                self.base_url, 'notebooks', path, name
            ))
            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
 
#-----------------------------------------------------------------------------
    def get(self, path=''):
        nbm = self.notebook_manager
        if nbm.path_exists(path):
            # it's a *directory*, redirect to /tree
            url = url_path_join(self.base_url, 'tree', path)
                    path = path.replace('/files/', '/', 1)
 
            url = url_path_join(self.base_url, 'files', path)
        url = url_escape(url)
        self.log.debug("Redirecting %s to %s", self.request.path, 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
 
#-----------------------------------------------------------------------------
    def get(self, path=''):
        nbm = self.notebook_manager
        if nbm.path_exists(path):
            # it's a *directory*, redirect to /tree
            url = url_path_join(self.base_url, 'tree', path)
                    path = path.replace('/files/', '/', 1)
 
            url = url_path_join(self.base_url, 'files', path)
        url = url_escape(url)
        self.log.debug("Redirecting %s to %s", self.request.path, url)

src/i/p/ipython-2.0.0/IPython/html/notebookapp.py   ipython(Download)
from IPython.utils.path import filefind, get_ipython_dir
 
from .utils import url_path_join
 
#-----------------------------------------------------------------------------
            static_path=ipython_app.static_file_path,
            static_handler_class = FileFindHandler,
            static_url_prefix = url_path_join(base_url,'/static/'),
 
            # authentication
            cookie_secret=ipython_app.cookie_secret,
            login_url=url_path_join(base_url,'/login'),
        new_handlers = []
        for handler in handlers:
            pattern = url_path_join(settings['base_url'], handler[0])
            new_handler = tuple([pattern] + list(handler[1:]))
            new_handlers.append(new_handler)
    def _mathjax_url_default(self):
        if not self.enable_mathjax:
            return u''
        static_url_prefix = self.webapp_settings.get("static_url_prefix",
                         url_path_join(self.base_url, "static")

src/i/p/ipython-HEAD/IPython/html/notebookapp.py   ipython(Download)
from IPython.utils.path import filefind, get_ipython_dir
 
from .utils import url_path_join
 
#-----------------------------------------------------------------------------
            static_path=ipython_app.static_file_path,
            static_handler_class = FileFindHandler,
            static_url_prefix = url_path_join(base_url,'/static/'),
 
            # authentication
            cookie_secret=ipython_app.cookie_secret,
            login_url=url_path_join(base_url,'/login'),
        new_handlers = []
        for handler in handlers:
            pattern = url_path_join(settings['base_url'], handler[0])
            new_handler = tuple([pattern] + list(handler[1:]))
            new_handlers.append(new_handler)
    def _mathjax_url_default(self):
        if not self.enable_mathjax:
            return u''
        static_url_prefix = self.webapp_settings.get("static_url_prefix",
                         url_path_join(self.base_url, "static")