Jupyter Shell (xonsh.jupyter_shell
)
An interactive shell for the Jupyter kernel.
-
class xonsh.jupyter_shell.JupyterShell(*args, **kwargs)[source]
A shell for the Jupyter kernel.
-
default(line, kernel, parent_header=None)[source]
Executes code, but redirects output to Jupyter client
-
class xonsh.jupyter_shell.StdJupyterRedirect(name, kernel, parent_header=None)[source]
Redirects a standard I/O stream to the Jupyter kernel.
- Parameters
- namestr
The name of the buffer in the sys module, e.g. ‘stdout’.
- kernelXonshKernel
Instance of a Jupyter kernel
- parent_headerdict or None, optional
parent header information to pass along with the kernel
-
close()[source]
Restores the original std stream.
-
detach()[source]
This operation is not supported.
-
fileno()[source]
Tunnel fileno() calls to the std stream.
-
flush()[source]
Flushes kernel iopub_stream.
-
read(size=None)[source]
Read from the stream
-
readline(size=- 1)[source]
Read a line.
-
seek(offset, whence=0)[source]
Seek to a location.
-
truncate(size=None)[source]
Truncate the streams.
-
write(s)[source]
Writes data to the original kernel stream.
-
property encoding
The encoding of the stream
-
property errors
The encoding errors of the stream
-
property newlines
The newlines of the standard buffer.
-
class xonsh.jupyter_shell.StdJupyterRedirectBuf(redirect)[source]
Redirects standard I/O buffers to the Jupyter kernel.
-
fileno()[source]
Returns the file descriptor of the std buffer.
-
readinto(b)[source]
Read bytes into buffer from both streams.
-
seek(offset, whence=0)[source]
Sets the location in both the stdbuf and the membuf.
-
truncate(size=None)[source]
Truncate both buffers.
-
write(b)[source]
Write bytes to kernel.