Class: PyoliteRemoteKernel#
@jupyterlite/pyolite-kernel.PyoliteRemoteKernel
An interface for pyolite workers.
Implements#
Constructors#
constructor#
new PyoliteRemoteKernel()
Defined in#
Properties#
_driveFS#
Protected_driveFS:null|DriveFS=null
Defined in#
_driveName#
Protected_driveName:string=''
Defined in#
_initialized#
Protected_initialized:Promise<void>
A promise that resolves when all initiaization is complete.
Defined in#
_initializer#
Private_initializer:null| {reject: () =>void;resolve: () =>void} =null
Defined in#
_interpreter#
Protected_interpreter:any
Defined in#
_kernel#
Protected_kernel:any
Defined in#
_localPath#
Protected_localPath:string=''
TODO: real typing
Defined in#
_options#
Protected_options:null|IOptions=null
Initialization options.
Defined in#
_pyodide#
Protected_pyodide:PyodideInterface
Defined in#
_resolveInputReply#
Protected_resolveInputReply:any
Defined in#
_stderr_stream#
Protected_stderr_stream:any
Defined in#
_stdout_stream#
Protected_stdout_stream:any
Defined in#
Methods#
commClose#
commClose(content,parent):Promise<any>
Respond to the commClose.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the comm close. |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
commInfo#
commInfo(content,parent):Promise<any>
Respond to the commInfoRequest.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the comm target name. |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
commMsg#
commMsg(content,parent):Promise<any>
Respond to the commMsg.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the comm msg. |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
commOpen#
commOpen(content,parent):Promise<any>
Respond to the commOpen.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the comm open. |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
complete#
complete(content,parent):Promise<any>
Complete the code submitted by a user.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the code to complete. |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
execute#
execute(content,parent):Promise<any>
Execute code with the interpreter.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the code to execute. |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
formatResult#
formatResult(res):any
Format the response from the Pyodide evaluation.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The result object from the Pyodide evaluation |
Returns#
any
Defined in#
getpass#
getpass(prompt):Promise<any>
Parameters#
Name |
Type |
|---|---|
|
|
Returns#
Promise<any>
Defined in#
initFilesystem#
ProtectedinitFilesystem(options):Promise<void>
Setup custom Emscripten FileSystem
Parameters#
Name |
Type |
|---|---|
|
Returns#
Promise<void>
Defined in#
initGlobals#
ProtectedinitGlobals(options):Promise<void>
Parameters#
Name |
Type |
|---|---|
|
Returns#
Promise<void>
Defined in#
initKernel#
ProtectedinitKernel(options):Promise<void>
Parameters#
Name |
Type |
|---|---|
|
Returns#
Promise<void>
Defined in#
initPackageManager#
ProtectedinitPackageManager(options):Promise<void>
Parameters#
Name |
Type |
|---|---|
|
Returns#
Promise<void>
Defined in#
initRuntime#
ProtectedinitRuntime(options):Promise<void>
Parameters#
Name |
Type |
|---|---|
|
Returns#
Promise<void>
Defined in#
initialize#
initialize(options):Promise<void>
Accept the URLs from the host
Parameters#
Name |
Type |
|---|---|
|
Returns#
Promise<void>
Implementation of#
Defined in#
input#
input(prompt):Promise<any>
Parameters#
Name |
Type |
|---|---|
|
|
Returns#
Promise<any>
Defined in#
inputReply#
inputReply(content,parent):Promise<void>
Resolve the input request by getting back the reply from the main thread
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the reply |
|
|
- |
Returns#
Promise<void>
Implementation of#
Defined in#
inspect#
inspect(content,parent):Promise<any>
Inspect the code submitted by a user.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the code to inspect. |
|
|
- |
|
|
- |
|
|
- |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
isComplete#
isComplete(content,parent):Promise<any>
Check code for completeness submitted by a user.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The incoming message with the code to check. |
|
|
- |
|
|
- |
Returns#
Promise<any>
Implementation of#
Defined in#
mapToObject#
mapToObject(obj):any
Recursively convert a Map to a JavaScript object
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
A Map, Array, or other object to convert |
Returns#
any
Defined in#
sendComm#
sendComm(type,content,metadata,ident,buffers):Promise<void>
Send a comm message to the front-end.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The type of the comm message. |
|
|
The content. |
|
|
The metadata. |
|
|
The ident. |
|
|
The binary buffers. |
Returns#
Promise<void>
Defined in#
sendInputRequest#
sendInputRequest(prompt,password):Promise<void>
Send a input request to the front-end.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
the text to show at the prompt |
|
|
Is the request for a password? |
Returns#
Promise<void>
Defined in#
setup#
setup(parent):Promise<void>
Makes sure pyodide is ready before continuing, and cache the parent message.
Parameters#
Name |
Type |
|---|---|
|
|
Returns#
Promise<void>