File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2
2
import signal
3
3
import uuid
4
4
5
- from jupyter_core .application import JupyterApp
5
+ from jupyter_core .application import JupyterApp , base_flags
6
6
from tornado .ioloop import IOLoop
7
7
from traitlets import Unicode
8
8
11
11
from .manager import KernelManager
12
12
13
13
class KernelApp (JupyterApp ):
14
+ """Launch a kernel by name in a local subprocess.
15
+ """
14
16
version = __version__
15
- description = "Run a kernel locally"
17
+ description = "Run a kernel locally in a subprocess "
16
18
17
19
classes = [KernelManager , KernelSpecManager ]
18
20
19
21
aliases = {
20
22
'kernel' : 'KernelApp.kernel_name' ,
21
23
'ip' : 'KernelManager.ip' ,
22
24
}
25
+ flags = {'debug' : base_flags ['debug' ]}
23
26
24
27
kernel_name = Unicode (NATIVE_KERNEL_NAME ,
25
- help = 'The name of a kernel to start'
28
+ help = 'The name of a kernel type to start'
26
29
).tag (config = True )
27
30
28
31
def initialize (self , argv = None ):
@@ -34,6 +37,7 @@ def initialize(self, argv=None):
34
37
self .loop = IOLoop .current ()
35
38
36
39
def setup_signals (self ):
40
+ """Shutdown on SIGTERM or SIGINT (Ctrl-C)"""
37
41
if os .name == 'nt' :
38
42
return
39
43
You can’t perform that action at this time.
0 commit comments