##// END OF EJS Templates
log the notebook server directory...
Paul Ivanov -
Show More
@@ -484,7 +484,6 b' class NotebookApp(BaseIPythonApplication):'
484 )
484 )
485 kls = import_item(self.notebook_manager_class)
485 kls = import_item(self.notebook_manager_class)
486 self.notebook_manager = kls(config=self.config, log=self.log)
486 self.notebook_manager = kls(config=self.config, log=self.log)
487 self.notebook_manager.log_info()
488 self.notebook_manager.load_notebook_names()
487 self.notebook_manager.load_notebook_names()
489 self.cluster_manager = ClusterManager(config=self.config, log=self.log)
488 self.cluster_manager = ClusterManager(config=self.config, log=self.log)
490 self.cluster_manager.update_profiles()
489 self.cluster_manager.update_profiles()
@@ -576,7 +575,10 b' class NotebookApp(BaseIPythonApplication):'
576 """
575 """
577 # FIXME: remove this delay when pyzmq dependency is >= 2.1.11
576 # FIXME: remove this delay when pyzmq dependency is >= 2.1.11
578 time.sleep(0.1)
577 time.sleep(0.1)
579 sys.stdout.write("Shutdown Notebook Server at %s (y/[n])? " % self._url)
578 info = self.log.info
579 info('interrupted')
580 self.print_notebook_info()
581 info("Shutdown this notebook server (y/[n])? ")
580 sys.stdout.flush()
582 sys.stdout.flush()
581 r,w,x = select.select([sys.stdin], [], [], 5)
583 r,w,x = select.select([sys.stdin], [], [], 5)
582 if r:
584 if r:
@@ -615,6 +617,11 b' class NotebookApp(BaseIPythonApplication):'
615 self.log.info('Shutting down kernels')
617 self.log.info('Shutting down kernels')
616 self.kernel_manager.shutdown_all()
618 self.kernel_manager.shutdown_all()
617
619
620 def print_notebook_info(self):
621 "Print the current working directory and the server url information"
622 self.notebook_manager.log_info()
623 self.log.info("The IPython Notebook is running at: %s" % self._url)
624
618 def start(self):
625 def start(self):
619 """ Start the IPython Notebok server app, after initialization
626 """ Start the IPython Notebok server app, after initialization
620
627
@@ -625,7 +632,7 b' class NotebookApp(BaseIPythonApplication):'
625 info = self.log.info
632 info = self.log.info
626 self._url = "%s://%s:%i%s" % (proto, ip, self.port,
633 self._url = "%s://%s:%i%s" % (proto, ip, self.port,
627 self.base_project_url)
634 self.base_project_url)
628 info("The IPython Notebook is running at: %s" % self._url)
635 self.print_notebook_info()
629 info("Use Control-C to stop this server and shut down all kernels.")
636 info("Use Control-C to stop this server and shut down all kernels.")
630
637
631 if self.open_browser or self.file_to_run:
638 if self.open_browser or self.file_to_run:
General Comments 0
You need to be logged in to leave comments. Login now