Skip to content

Commit 1d278ca

Browse files
takluyverMeeseeksDev[bot]
authored andcommitted
Backport PR #346: Prevent creating new console on Windows
1 parent f575003 commit 1d278ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jupyter_client/launcher.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ def launch_kernel(cmd, stdin=None, stdout=None, stderr=None, env=None,
111111
DUPLICATE_SAME_ACCESS)
112112
env['JPY_PARENT_PID'] = str(int(handle))
113113

114+
# Prevent creating new console window on pythonw
115+
if redirect_out:
116+
kwargs['creationflags'] = kwargs.setdefault('creationflags', 0) | 0x08000000 # CREATE_NO_WINDOW
117+
114118
else:
115119
# Create a new session.
116120
# This makes it easier to interrupt the kernel,

0 commit comments

Comments
 (0)