Ejemplo n.º 1
0
    def init_configurables(self):
        # force Session default to be secure
        default_secure(self.config)

        self.kernel_spec_manager = self.kernel_spec_manager_class(
            ipython_dir=self.ipython_dir, )
        self.kernel_manager = self.kernel_manager_class(
            parent=self,
            log=self.log,
            ipython_kernel_argv=self.ipython_kernel_argv,
            connection_dir=self.profile_dir.security_dir,
        )
        self.contents_manager = self.contents_manager_class(
            parent=self,
            log=self.log,
        )
        self.session_manager = self.session_manager_class(
            parent=self,
            log=self.log,
            kernel_manager=self.kernel_manager,
            contents_manager=self.contents_manager,
        )
        self.cluster_manager = self.cluster_manager_class(
            parent=self,
            log=self.log,
        )

        self.config_manager = self.config_manager_class(
            parent=self,
            log=self.log,
            profile_dir=self.profile_dir.location,
        )
Ejemplo n.º 2
0
    def init_configurables(self):
        # force Session default to be secure
        default_secure(self.config)
        kls = import_item(self.kernel_spec_manager_class)
        self.kernel_spec_manager = kls(ipython_dir=self.ipython_dir)

        kls = import_item(self.kernel_manager_class)
        self.kernel_manager = kls(
            parent=self, log=self.log, ipython_kernel_argv=self.ipython_kernel_argv,
            connection_dir = self.profile_dir.security_dir,
        )
        kls = import_item(self.contents_manager_class)
        self.contents_manager = kls(parent=self, log=self.log)
        kls = import_item(self.session_manager_class)
        self.session_manager = kls(parent=self, log=self.log,
                                   kernel_manager=self.kernel_manager,
                                   contents_manager=self.contents_manager)
        kls = import_item(self.cluster_manager_class)
        self.cluster_manager = kls(parent=self, log=self.log)
        self.cluster_manager.update_profiles()
        self.login_handler_class = import_item(self.login_handler)
        self.logout_handler_class = import_item(self.logout_handler)

        kls = import_item(self.config_manager_class)
        self.config_manager = kls(parent=self, log=self.log,
                                  profile_dir=self.profile_dir.location)
Ejemplo n.º 3
0
    def init_configurables(self):
        # force Session default to be secure
        default_secure(self.config)

        self.kernel_spec_manager = self.kernel_spec_manager_class(
            parent=self,
            ipython_dir=self.ipython_dir,
        )
        self.kernel_manager = self.kernel_manager_class(
            parent=self,
            log=self.log,
            ipython_kernel_argv=self.ipython_kernel_argv,
            connection_dir=self.profile_dir.security_dir,
        )
        self.contents_manager = self.contents_manager_class(
            parent=self,
            log=self.log,
        )
        self.session_manager = self.session_manager_class(
            parent=self,
            log=self.log,
            kernel_manager=self.kernel_manager,
            contents_manager=self.contents_manager,
        )
        self.cluster_manager = self.cluster_manager_class(
            parent=self,
            log=self.log,
        )

        self.config_manager = self.config_manager_class(
            parent=self,
            log=self.log,
            profile_dir=self.profile_dir.location,
        )
Ejemplo n.º 4
0
    def init_configurables(self):
        # force Session default to be secure
        default_secure(self.config)
        kls = import_item(self.kernel_spec_manager_class)
        self.kernel_spec_manager = kls(ipython_dir=self.ipython_dir)

        kls = import_item(self.kernel_manager_class)
        self.kernel_manager = kls(
            parent=self,
            log=self.log,
            ipython_kernel_argv=self.ipython_kernel_argv,
            connection_dir=self.profile_dir.security_dir,
        )
        kls = import_item(self.contents_manager_class)
        self.contents_manager = kls(parent=self, log=self.log)
        kls = import_item(self.session_manager_class)
        self.session_manager = kls(parent=self,
                                   log=self.log,
                                   kernel_manager=self.kernel_manager,
                                   contents_manager=self.contents_manager)
        kls = import_item(self.cluster_manager_class)
        self.cluster_manager = kls(parent=self, log=self.log)
        self.cluster_manager.update_profiles()
        self.login_handler_class = import_item(self.login_handler)
        self.logout_handler_class = import_item(self.logout_handler)

        kls = import_item(self.config_manager_class)
        self.config_manager = kls(parent=self,
                                  log=self.log,
                                  profile_dir=self.profile_dir.location)
Ejemplo n.º 5
0
 def initialize(self, argv=None):
     """
     Classes which mix this class in should call:
            IPythonConsoleApp.initialize(self,argv)
     """
     self.init_connection_file()
     default_secure(self.config)
     self.init_ssh()
     self.init_kernel_manager()
Ejemplo n.º 6
0
 def init_configurables(self):
     # force Session default to be secure
     default_secure(self.config)
     self.kernel_manager = MappingKernelManager(
         parent=self, log=self.log, kernel_argv=self.kernel_argv,
         connection_dir = self.profile_dir.security_dir,
     )
     kls = import_item(self.notebook_manager_class)
     self.notebook_manager = kls(parent=self, log=self.log)
     self.notebook_manager.load_notebook_names()
Ejemplo n.º 7
0
 def init_configurables(self):
     # force Session default to be secure
     default_secure(self.config)
     self.kernel_manager = MappingKernelManager(
         config=self.config, log=self.log, kernel_argv=self.kernel_argv,
         connection_dir = self.profile_dir.security_dir,
     )
     self.notebook_manager = NotebookManager(config=self.config, log=self.log)
     self.log.info("Serving notebooks from %s", self.notebook_manager.notebook_dir)
     self.cluster_manager = ClusterManager(config=self.config, log=self.log)
     self.cluster_manager.update_profiles()
Ejemplo n.º 8
0
 def init_configurables(self):
     # force Session default to be secure
     default_secure(self.config)
     kls = import_item(self.kernel_manager_class)
     self.kernel_manager = kls(
         parent=self, log=self.log, kernel_argv=self.kernel_argv, connection_dir=self.profile_dir.security_dir
     )
     kls = import_item(self.notebook_manager_class)
     self.notebook_manager = kls(parent=self, log=self.log)
     kls = import_item(self.session_manager_class)
     self.session_manager = kls(parent=self, log=self.log)
Ejemplo n.º 9
0
 def init_configurables(self):
     # force Session default to be secure
     default_secure(self.config)
     self.kernel_manager = MappingKernelManager(
         config=self.config, log=self.log, kernel_argv=self.kernel_argv,
         connection_dir = self.profile_dir.security_dir,
     )
     kls = import_item(self.notebook_manager_class)
     self.notebook_manager = kls(config=self.config, log=self.log)
     self.notebook_manager.load_notebook_names()
     self.cluster_manager = ClusterManager(config=self.config, log=self.log)
     self.cluster_manager.update_profiles()
Ejemplo n.º 10
0
    def load_secondary_config(self):
        """secondary config, loading from JSON and setting defaults"""
        if self.reuse_files:
            try:
                self.load_config_from_json()
            except (AssertionError, IOError) as e:
                self.log.error("Could not load config from JSON: %s" % e)
            else:
                # successfully loaded config from JSON, and reuse=True
                # no need to wite back the same file
                self.write_connection_files = False

        # switch Session.key default to secure
        default_secure(self.config)
        self.log.debug("Config changed")
        self.log.debug(repr(self.config))
Ejemplo n.º 11
0
 def load_secondary_config(self):
     """secondary config, loading from JSON and setting defaults"""
     if self.reuse_files:
         try:
             self.load_config_from_json()
         except (AssertionError,IOError) as e:
             self.log.error("Could not load config from JSON: %s" % e)
         else:
             # successfully loaded config from JSON, and reuse=True
             # no need to wite back the same file
             self.write_connection_files = False
             
     # switch Session.key default to secure
     default_secure(self.config)
     self.log.debug("Config changed")
     self.log.debug(repr(self.config))
Ejemplo n.º 12
0
 def init_configurables(self):
     # force Session default to be secure
     default_secure(self.config)
     kls = import_item(self.kernel_manager_class)
     self.kernel_manager = kls(
         parent=self,
         log=self.log,
         kernel_argv=self.kernel_argv,
         connection_dir=self.profile_dir.security_dir,
     )
     kls = import_item(self.notebook_manager_class)
     self.notebook_manager = kls(parent=self, log=self.log)
     kls = import_item(self.session_manager_class)
     self.session_manager = kls(parent=self,
                                log=self.log,
                                kernel_manager=self.kernel_manager,
                                notebook_manager=self.notebook_manager)
     kls = import_item(self.cluster_manager_class)
     self.cluster_manager = kls(parent=self, log=self.log)
     self.cluster_manager.update_profiles()
Ejemplo n.º 13
0
 def init_session(self):
     """create our session object"""
     default_secure(self.config)
     self.session = Session(parent=self, username=u'kernel')
Ejemplo n.º 14
0
 def init_session(self):
     """create our session object"""
     default_secure(self.config)
     self.session = Session(parent=self, username=u'kernel')