File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 11
11
import signal
12
12
import sys
13
13
import time
14
- import warnings
15
- try :
16
- from queue import Empty # Py 3
17
- except ImportError :
18
- from Queue import Empty # Py 2
19
14
20
15
import zmq
21
16
29
24
kernelspec ,
30
25
)
31
26
from .connect import ConnectionFileMixin
32
- from .session import Session
33
27
from .managerabc import (
34
28
KernelManagerABC
35
29
)
@@ -174,8 +168,10 @@ def format_kernel_cmd(self, extra_arguments=None):
174
168
else :
175
169
cmd = self .kernel_spec .argv + extra_arguments
176
170
177
- if cmd and cmd [0 ] == 'python' :
178
- # executable is 'python', use sys.executable.
171
+ if cmd and cmd [0 ] in {'python' ,
172
+ 'python%i' % sys .version_info [0 ],
173
+ 'python%i.%i' % sys .version_info [:2 ]}:
174
+ # executable is 'python' or 'python3', use sys.executable.
179
175
# These will typically be the same,
180
176
# but if the current process is in an env
181
177
# and has been launched by abspath without
You can’t perform that action at this time.
0 commit comments