##// END OF EJS Templates
Merge pull request #7098 from jasongrout/favicon-block...
Merge pull request #7098 from jasongrout/favicon-block Make the favicon a template block

File last commit:

r18616:d4e327ea
r19189:f1783807 merge
Show More
__init__.py
17 lines | 800 B | text/x-python | PythonLexer
Thomas Kluyver
Multiple terminals and conditional initialisation
r18482 import os
from terminado import NamedTermManager
Thomas Kluyver
Put terminal handlers under base_url
r18485 from IPython.html.utils import url_path_join as ujoin
Min RK
create new terminals with POST /api/terminals...
r18616 from .handlers import TerminalHandler, TermSocket
Thomas Kluyver
Initial REST API for terminals
r18483 from . import api_handlers
Thomas Kluyver
Multiple terminals and conditional initialisation
r18482
def initialize(webapp):
shell = os.environ.get('SHELL', 'sh')
Min RK
create new terminals with POST /api/terminals...
r18616 terminal_manager = webapp.settings['terminal_manager'] = NamedTermManager(shell_command=[shell])
Thomas Kluyver
Put terminal handlers under base_url
r18485 base_url = webapp.settings['base_url']
Thomas Kluyver
Multiple terminals and conditional initialisation
r18482 handlers = [
Thomas Kluyver
Put terminal handlers under base_url
r18485 (ujoin(base_url, r"/terminals/(\w+)"), TerminalHandler),
(ujoin(base_url, r"/terminals/websocket/(\w+)"), TermSocket,
Min RK
create new terminals with POST /api/terminals...
r18616 {'term_manager': terminal_manager}),
Thomas Kluyver
Put terminal handlers under base_url
r18485 (ujoin(base_url, r"/api/terminals"), api_handlers.TerminalRootHandler),
(ujoin(base_url, r"/api/terminals/(\w+)"), api_handlers.TerminalHandler),
Thomas Kluyver
Multiple terminals and conditional initialisation
r18482 ]
webapp.add_handlers(".*$", handlers)