Exemplo n.º 1
0
    def __init__(self, root_node, pty, logger_interface, clone_shell=None):
        self.root_node = root_node
        self.pty = pty
        self.logger_interface = logger_interface

        if clone_shell:
            self.state = clone_shell.state.clone()
        else:
            self._reset_navigation()

        # CLI interface
        self.root_handler = RootHandler(self)
        CLInterface.__init__(self, self.pty, self.root_handler)
Exemplo n.º 2
0
    def __init__(self, root_service, pty, logger_interface, clone_shell=None, username=None):
        self.root_service = root_service
        self.pty = pty
        self._username = username
        self.logger_interface = logger_interface

        if clone_shell:
            self.state = clone_shell.state.clone()
        else:
            self._reset_navigation()

        # CLI interface
        self.root_handler = RootHandler(self)
        CLInterface.__init__(self, self.pty, self.root_handler)
Exemplo n.º 3
0
    def __init__(self, pty, host, logger_interface, clone_shell=None): # XXX: import clone_shell
        assert issubclass(host, Host)
        assert pty

        self.host = type('RemoteSCPHost', (CacheMixin, host), { })(pty=pty, logger=logger_interface)
        self.host.fill_cache(pty)
        self.localhost = LocalHost(pty=pty, logger=logger_interface)
        self.localhost.host_context._chdir(os.getcwd())
        self.pty = pty
        self.root_handler = RootHandler(self)

        CLInterface.__init__(self, self.pty, RootHandler(self))

        # Caching for autocompletion (directory -> list of content.)
        self._cd_cache = { }
Exemplo n.º 4
0
    def __init__(self,
                 root_node,
                 pty,
                 options,
                 logger_interface,
                 clone_shell=None):
        self.root_node = root_node
        self.pty = pty
        self.options = options
        self.logger_interface = logger_interface

        if clone_shell:
            self.state = clone_shell.state.clone()
        else:
            self._reset_navigation()

        # CLI interface
        self.root_handler = RootHandler(self)
        CLInterface.__init__(self, self.pty, self.root_handler)
Exemplo n.º 5
0
    def __init__(self,
                 pty,
                 host,
                 logger_interface,
                 clone_shell=None):  # XXX: import clone_shell
        assert issubclass(host, Host)
        assert pty

        self.host = type('RemoteSCPHost', (CacheMixin, host),
                         {})(pty=pty, logger=logger_interface)
        self.host.fill_cache(pty)
        self.localhost = LocalHost(pty=pty, logger=logger_interface)
        self.localhost.host_context._chdir(os.getcwd())
        self.pty = pty
        self.root_handler = RootHandler(self)

        CLInterface.__init__(self, self.pty, RootHandler(self))

        # Caching for autocompletion (directory -> list of content.)
        self._cd_cache = {}