Show More
@@ -1,23 +1,10 b'' | |||||
1 | # coding: utf-8 |
|
1 | # coding: utf-8 | |
2 | """A tornado based IPython notebook server. |
|
2 | """A tornado based IPython notebook server.""" | |
3 |
|
3 | |||
4 | Authors: |
|
4 | # Copyright (c) IPython Development Team. | |
|
5 | # Distributed under the terms of the Modified BSD License. | |||
5 |
|
6 | |||
6 | * Brian Granger |
|
|||
7 | """ |
|
|||
8 | from __future__ import print_function |
|
7 | from __future__ import print_function | |
9 | #----------------------------------------------------------------------------- |
|
|||
10 | # Copyright (C) 2013 The IPython Development Team |
|
|||
11 | # |
|
|||
12 | # Distributed under the terms of the BSD License. The full license is in |
|
|||
13 | # the file COPYING, distributed as part of this software. |
|
|||
14 | #----------------------------------------------------------------------------- |
|
|||
15 |
|
||||
16 | #----------------------------------------------------------------------------- |
|
|||
17 | # Imports |
|
|||
18 | #----------------------------------------------------------------------------- |
|
|||
19 |
|
||||
20 | # stdlib |
|
|||
21 | import errno |
|
8 | import errno | |
22 | import io |
|
9 | import io | |
23 | import json |
|
10 | import json | |
@@ -33,7 +20,6 b' import time' | |||||
33 | import webbrowser |
|
20 | import webbrowser | |
34 |
|
21 | |||
35 |
|
22 | |||
36 | # Third party |
|
|||
37 | # check for pyzmq 2.1.11 |
|
23 | # check for pyzmq 2.1.11 | |
38 | from IPython.utils.zmqrelated import check_for_zmq |
|
24 | from IPython.utils.zmqrelated import check_for_zmq | |
39 | check_for_zmq('2.1.11', 'IPython.html') |
|
25 | check_for_zmq('2.1.11', 'IPython.html') | |
@@ -61,7 +47,6 b' if version_info < (3,1,0):' | |||||
61 | from tornado import httpserver |
|
47 | from tornado import httpserver | |
62 | from tornado import web |
|
48 | from tornado import web | |
63 |
|
49 | |||
64 | # Our own libraries |
|
|||
65 | from IPython.html import DEFAULT_STATIC_FILES_PATH |
|
50 | from IPython.html import DEFAULT_STATIC_FILES_PATH | |
66 | from .base.handlers import Template404 |
|
51 | from .base.handlers import Template404 | |
67 | from .log import log_request |
|
52 | from .log import log_request | |
@@ -78,7 +63,6 b' from IPython.config.application import catch_config_error, boolean_flag' | |||||
78 | from IPython.core.application import BaseIPythonApplication |
|
63 | from IPython.core.application import BaseIPythonApplication | |
79 | from IPython.core.profiledir import ProfileDir |
|
64 | from IPython.core.profiledir import ProfileDir | |
80 | from IPython.consoleapp import IPythonConsoleApp |
|
65 | from IPython.consoleapp import IPythonConsoleApp | |
81 | from IPython.kernel import swallow_argv |
|
|||
82 | from IPython.kernel.zmq.session import default_secure |
|
66 | from IPython.kernel.zmq.session import default_secure | |
83 | from IPython.kernel.zmq.kernelapp import ( |
|
67 | from IPython.kernel.zmq.kernelapp import ( | |
84 | kernel_flags, |
|
68 | kernel_flags, | |
@@ -561,16 +545,7 b' class NotebookApp(BaseIPythonApplication):' | |||||
561 |
|
545 | |||
562 | def init_kernel_argv(self): |
|
546 | def init_kernel_argv(self): | |
563 | """construct the kernel arguments""" |
|
547 | """construct the kernel arguments""" | |
564 | # Scrub frontend-specific flags |
|
548 | self.kernel_argv = [] | |
565 | self.kernel_argv = swallow_argv(self.argv, notebook_aliases, notebook_flags) |
|
|||
566 | if any(arg.startswith(u'--pylab') for arg in self.kernel_argv): |
|
|||
567 | self.log.warn('\n '.join([ |
|
|||
568 | "Starting all kernels in pylab mode is not recommended,", |
|
|||
569 | "and will be disabled in a future release.", |
|
|||
570 | "Please use the %matplotlib magic to enable matplotlib instead.", |
|
|||
571 | "pylab implies many imports, which can have confusing side effects", |
|
|||
572 | "and harm the reproducibility of your notebooks.", |
|
|||
573 | ])) |
|
|||
574 | # Kernel should inherit default config file from frontend |
|
549 | # Kernel should inherit default config file from frontend | |
575 | self.kernel_argv.append("--IPKernelApp.parent_appname='%s'" % self.name) |
|
550 | self.kernel_argv.append("--IPKernelApp.parent_appname='%s'" % self.name) | |
576 | # Kernel should get *absolute* path to profile directory |
|
551 | # Kernel should get *absolute* path to profile directory |
General Comments 0
You need to be logged in to leave comments.
Login now