Class: PyoliteRemoteKernel#

pyolite-kernel.PyoliteRemoteKernel

Constructors#

constructor#

new PyoliteRemoteKernel()

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:4

Properties#

_driveFS#

Protected _driveFS: null | DriveFS

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:132


_driveName#

Protected _driveName: string

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:125


_initialized#

Protected _initialized: Promise<void>

A promise that resolves when all initiaization is complete.

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:121


_initializer#

Private _initializer: any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:122


_interpreter#

Protected _interpreter: any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:128


_kernel#

Protected _kernel: any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:127


_localPath#

Protected _localPath: string

TODO: real typing

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:124


_options#

Protected _options: null | IOptions

Initialization options.

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:117


_pyodide#

Protected _pyodide: any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:126


_resolveInputReply#

Protected _resolveInputReply: any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:131


_stderr_stream#

Protected _stderr_stream: any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:130


_stdout_stream#

Protected _stdout_stream: any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:129

Methods#

commClose#

commClose(content, parent): Promise<any>

Respond to the commClose.

Parameters#

Name

Type

Description

content

any

The incoming message with the comm close.

parent

any

-

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:88


commInfo#

commInfo(content, parent): Promise<{ comms: any ; status: string }>

Respond to the commInfoRequest.

Parameters#

Name

Type

Description

content

any

The incoming message with the comm target name.

parent

any

-

Returns#

Promise<{ comms: any ; status: string }>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:67


commMsg#

commMsg(content, parent): Promise<any>

Respond to the commMsg.

Parameters#

Name

Type

Description

content

any

The incoming message with the comm msg.

parent

any

-

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:82


commOpen#

commOpen(content, parent): Promise<any>

Respond to the commOpen.

Parameters#

Name

Type

Description

content

any

The incoming message with the comm open.

parent

any

-

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:76


complete#

complete(content, parent): Promise<any>

Complete the code submitted by a user.

Parameters#

Name

Type

Description

content

any

The incoming message with the code to complete.

parent

any

-

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:43


execute#

execute(content, parent): Promise<any>

Execute code with the interpreter.

Parameters#

Name

Type

Description

content

any

The incoming message with the code to execute.

parent

any

-

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:37


formatResult#

formatResult(res): any

Format the response from the Pyodide evaluation.

Parameters#

Name

Type

Description

res

any

The result object from the Pyodide evaluation

Returns#

any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:27


getpass#

getpass(prompt): Promise<any>

Parameters#

Name

Type

prompt

string

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:102


initFilesystem#

Protected initFilesystem(options): Promise<void>

Setup custom Emscripten FileSystem

Parameters#

Name

Type

options

IOptions

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:16


initGlobals#

Protected initGlobals(options): Promise<void>

Parameters#

Name

Type

options

IOptions

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:12


initKernel#

Protected initKernel(options): Promise<void>

Parameters#

Name

Type

options

IOptions

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:11


initPackageManager#

Protected initPackageManager(options): Promise<void>

Parameters#

Name

Type

options

IOptions

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:10


initRuntime#

Protected initRuntime(options): Promise<void>

Parameters#

Name

Type

options

IOptions

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:9


initialize#

initialize(options): Promise<void>

Accept the URLs from the host

Parameters#

Name

Type

options

IOptions

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:8


input#

input(prompt): Promise<any>

Parameters#

Name

Type

prompt

string

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:103


inputReply#

inputReply(content, parent): Promise<void>

Resolve the input request by getting back the reply from the main thread

Parameters#

Name

Type

Description

content

any

The incoming message with the reply

parent

any

-

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:94


inspect#

inspect(content, parent): Promise<any>

Inspect the code submitted by a user.

Parameters#

Name

Type

Description

content

Object

The incoming message with the code to inspect.

content.code

string

-

content.cursor_pos

number

-

content.detail_level

0 | 1

-

parent

any

-

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:49


isComplete#

isComplete(content, parent): Promise<any>

Check code for completeness submitted by a user.

Parameters#

Name

Type

Description

content

Object

The incoming message with the code to check.

content.code

string

-

parent

any

-

Returns#

Promise<any>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:59


mapToObject#

mapToObject(obj): any

Recursively convert a Map to a JavaScript object

Parameters#

Name

Type

Description

obj

any

A Map, Array, or other object to convert

Returns#

any

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:21


sendComm#

sendComm(type, content, metadata, ident, buffers): Promise<void>

Send a comm message to the front-end.

Parameters#

Name

Type

Description

type

string

The type of the comm message.

content

any

The content.

metadata

any

The metadata.

ident

any

The ident.

buffers

any

The binary buffers.

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:113


sendInputRequest#

sendInputRequest(prompt, password): Promise<void>

Send a input request to the front-end.

Parameters#

Name

Type

Description

prompt

string

the text to show at the prompt

password

boolean

Is the request for a password?

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:101


setup#

setup(parent): Promise<void>

Makes sure pyodide is ready before continuing, and cache the parent message.

Parameters#

Name

Type

parent

any

Returns#

Promise<void>

Defined in#

packages/pyolite-kernel/lib/worker.d.ts:31