{ } Raw JSON

bundles / ipykernel latest / ipykernel / iostream / OutStream / __init__

function

ipykernel.iostream:OutStream.__init__

source: /ipykernel/iostream.py:486

Signature

def __init__(self, session, pub_thread, name, pipe = None, echo = None, *, watchfd = True, isatty = False)

Parameters

session : object

the session object

pub_thread : threading.Thread

the publication thread

name : str {'stderr', 'stdout'}

the name of the standard stream to replace

pipe : object

the pipe object

echo : bool

whether to echo output

watchfd : bool (default, True)

Watch the file descriptor corresponding to the replaced stream. This is useful if you know some underlying code will write directly the file descriptor by its number. It will spawn a watching thread, that will swap the give file descriptor for a pipe, read from the pipe, and insert this into the current Stream.

isatty : bool (default, False)

Indication of whether this stream has terminal capabilities (e.g. can handle colors)

Aliases

  • ipykernel.iostream.OutStream.__init__