Skip to content

Commit 28836e6

Browse files
committed
Print message on stderr instead of stdout
1 parent 1584a06 commit 28836e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ipyparallel/client/magics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def nullcontext():
4949
from IPython.core.magic import Magics
5050
from IPython.core import magic_arguments
5151
from .. import error
52+
import sys
5253

5354
# -----------------------------------------------------------------------------
5455
# Definitions of magic functions for use with IPython
@@ -435,7 +436,8 @@ def parallel_execute(
435436
except KeyboardInterrupt:
436437
if signal_on_interrupt is not None:
437438
print(
438-
f"Received Keyboard Interrupt. Sending signal {signal_on_interrupt} to engines..."
439+
f"Received Keyboard Interrupt. Sending signal {signal_on_interrupt} to engines...",
440+
file=sys.stderr,
439441
)
440442
self.view.client.send_signal(
441443
signal_on_interrupt, targets=targets, block=True

0 commit comments

Comments
 (0)