##// END OF EJS Templates
cast kernel cwd to bytes on Python 2 on Windows...
MinRK -
Show More
@@ -21,6 +21,7 b' import os'
21 import sys
21 import sys
22 from subprocess import Popen, PIPE
22 from subprocess import Popen, PIPE
23
23
24 from IPython.utils.py3compat import cast_bytes_py2
24
25
25 #-----------------------------------------------------------------------------
26 #-----------------------------------------------------------------------------
26 # Launching Kernels
27 # Launching Kernels
@@ -185,6 +186,11 b' def launch_kernel(cmd, stdin=None, stdout=None, stderr=None,'
185
186
186 # Spawn a kernel.
187 # Spawn a kernel.
187 if sys.platform == 'win32':
188 if sys.platform == 'win32':
189
190 if cwd:
191 # Popen on Python 2 on Windows cannot handle unicode cwd.
192 cwd = cast_bytes_py2(cwd, sys.getfilesystemencoding() or 'ascii')
193
188 from IPython.kernel.zmq.parentpoller import ParentPollerWindows
194 from IPython.kernel.zmq.parentpoller import ParentPollerWindows
189 # Create a Win32 event for interrupting the kernel.
195 # Create a Win32 event for interrupting the kernel.
190 interrupt_event = ParentPollerWindows.create_interrupt_event()
196 interrupt_event = ParentPollerWindows.create_interrupt_event()
General Comments 0
You need to be logged in to leave comments. Login now